home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # (c) Cadre Technologies Inc. 1996
- #
- # File: @(#)itemnamech.tcl 1.6
- # Author: <generated>
- # Description:
- #---------------------------------------------------------------------------
- # SccsId = @(#)itemnamech.tcl 1.6 15 Apr 1996 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]
- $this item [$itemRef item]
- $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 oldGraph [$area graph]
- set oldGraphItem [[$oldGraph file] item]
- set oldSysV [[[$oldGraph file] system] selectedVersion $configV]
-
- $area changeName [$this item] $newName $useOld $configV
-
- set newGraph [$area graph]
- set newSysV [[[$newGraph file] system] selectedVersion $configV]
- if {$oldSysV != $newSysV} {
- $ed systemVersion $newSysV
- $ed changeFileVersion $newGraph
- } elseif {$oldGraphItem != [[$newGraph file] item]} {
- $ed changeFileVersion $newGraph
- }
-
- $this delete
- }
-
- # Do not delete this line -- regeneration end marker
-
-