home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1997 November
/
PCWorld_1997-11_cd.bin
/
software
/
programy
/
komix
/
DATA.Z
/
copygroupv.tcl
< prev
next >
Wrap
Text File
|
1996-10-18
|
3KB
|
107 lines
#---------------------------------------------------------------------------
#
# (c) Cadre Technologies Inc. 1996
#
# File: @(#)copygroupv.tcl /main/hindenburg/3
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)copygroupv.tcl /main/hindenburg/3 18 Oct 1996 Copyright 1996 Cadre Technologies Inc.
# Start user added include file section
# End user added include file section
Class CopyGroupVDlg : {TemplateDialog} {
constructor
method destructor
method handleOk
method popUp
attribute editPasteCmdBusy
attribute groupV
attribute fromSysV
attribute fromConfV
attribute toConfV
attribute dbObj
}
constructor CopyGroupVDlg {class this name} {
set this [TemplateDialog::constructor $class $this $name]
# Start constructor user section
interface DlgColumn $this.top {
Label groupVLab {}
CheckButton copyDefinition {
label "Copy Definition"
state 1
}
CheckButton copyContents {
label "Copy Contents"
state 0
}
}
$this config \
-modal yes \
-title "Copy GroupVersion" \
-editPasteCmdBusy [.main undoCommandBusy EditPasteCmd] \
-helpPressed {.main helpOnName copyGroupVersion} \
-cancelPressed {%this delete} \
-okPressed {%this handleOk}
# End constructor user section
return $this
}
method CopyGroupVDlg::destructor {this} {
# Start destructor user section
# End destructor user section
}
method CopyGroupVDlg::handleOk {this} {
set dbObj [$this dbObj]
set copyDefinition [$this.top.copyDefinition state]
set copyContents [$this.top.copyContents state]
set mask [expr ($copyDefinition << 1) | $copyContents]
case $mask in {
1 {set mode "contents"}
2 {set mode "definition"}
3 {set mode "all"}
default {set mode ""}
}
if {"$mode" != ""} {
set groupV [$this groupV]
set fromConfV [$this fromConfV]
set fromSysV [$this fromSysV]
set toConfV [$this toConfV]
# Remove imported object in case of a cut operation
set editPasteCmdBusy [$this editPasteCmdBusy]
if {$editPasteCmdBusy &&
"[[.main undoCommand] operation]" == "cut"} {
$fromSysV cutVersion $groupV
}
set script " $dbObj copy -groupVersion \
$groupV $fromSysV $fromConfV $toConfV $mode $editPasteCmdBusy"
if {$dbObj == [[.main currentObj] browsUiObj]} {
set update 1
} else {
set update 0
}
.main startCommand tcl \
"$script" "" \
"Copying [$groupV getInfo Text]" \
[list $update 0] 1
}
$this delete
}
method CopyGroupVDlg::popUp {this} {
$this.top.groupVLab text "[[$this groupV] getInfo Text]:"
$this TemplateDialog::popUp
}
# Do not delete this line -- regeneration end marker