home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # (c) Cadre Technologies Inc. 1996
- #
- # File: @(#)itemnamech.tcl /main/titanic/2
- # Author: <generated>
- # Description:
- #---------------------------------------------------------------------------
- # SccsId = @(#)itemnamech.tcl /main/titanic/2 15 Sep 1997 Copyright 1996 Cadre Technologies Inc.
-
- # Start user added include file section
- # End user added include file section
-
- require "namechange.tcl"
-
- Class ItemNameChangeDialog : {NameChangeDialog} {
- constructor
- method destructor
- method popUp
- method changeName
- }
-
- constructor ItemNameChangeDialog {class this name tool} {
- set this [NameChangeDialog::constructor $class $this $name $tool]
- # Start constructor user section
- # End constructor user section
- return $this
- }
-
- method ItemNameChangeDialog::destructor {this} {
- # Start destructor user section
- # End destructor user section
- $this NameChangeDialog::destructor
- }
-
- method ItemNameChangeDialog::popUp {this} {
- set itemRef [lindex [[$this tool] selectedItem] 0]
- $this text [$itemRef itemName]
- if [catch {$this item [$itemRef item]} msg] {
- wmtkerror $msg
- $this delete
- return
- }
- $this NameChangeDialog::popUp
- }
-
- method ItemNameChangeDialog::changeName {this useOld} {
- set ed [$this tool]
- set area [$ed editorArea]
- set configV [$this configV]
- set newName [$this text]
- set cc [ClientContext::global]
- set oldLevelPath [$cc currentLevelString]
- $area changeName [$this item] $newName $useOld $configV
- set newLevelPath [$cc currentLevelString]
- $ed removeHistEntry $oldLevelPath
- set entry [$ed mkHistEntry $newLevelPath 1]
- $ed insertHistEntry $entry
- $ed updateTitle
- $this delete
- }
-
- # Do not delete this line -- regeneration end marker
-
-