home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
deletemerg.tcl
< prev
next >
Wrap
Text File
|
1997-11-27
|
2KB
|
78 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: @(#)deletemerg.tcl /main/titanic/6
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)deletemerg.tcl /main/titanic/6 27 Nov 1997 Copyright 1997 Cayenne Software Inc.
# Start user added include file section
# End user added include file section
Class DeleteMergeDialog : {YesNoWarningDialog} {
constructor
method destructor
method handleYes
attribute mergeLink
attribute from
attribute to
}
constructor DeleteMergeDialog {class this name} {
set this [YesNoWarningDialog::constructor $class $this $name]
# Start constructor user section
$this config -yesPressed {%this handleYes} \
-title "Confirm Merge Link Delete" \
-message "Are you sure you want to delete this merge link ?"
$this helpPressed {.main helpOnName deleteMergeLink}
$this delCancelButton
# End constructor user section
return $this
}
method DeleteMergeDialog::destructor {this} {
# Start destructor user section
# End destructor user section
}
method DeleteMergeDialog::handleYes {this} {
# now search for the 'to' version in the mergeLinks
set from [[$this from] version]
set to [[$this to] version]
set link [query "from == $from" $to.mergeLinks]
if {$link == ""} {
wmtkerror "Merge Link not found"
return
}
$to removeMergeLink $link
# now remove from interface
set curSet [[.main infoView] mergeArrowSet]
# remove it
set length [llength $curSet]
set newCurSet ""
for {set idx 0} {$idx < $length} {incr idx} {
set from [lindex $curSet $idx]
incr idx
set to [lindex $curSet $idx]
if {$from == [$this from] && $to == [$this to]} {
# skip
} else {
lappend newCurSet $from
lappend newCurSet $to
}
}
[$this to] update
[.main infoView] mergeArrowSet $newCurSet
[.main infoView] redraw
}
# Do not delete this line -- regeneration end marker