home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1997 November
/
PCWorld_1997-11_cd.bin
/
software
/
programy
/
komix
/
DATA.Z
/
cobrenable.tcl
< prev
next >
Wrap
Text File
|
1996-09-17
|
3KB
|
117 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1996
#
# File: @(#)cobrenable.tcl /main/hindenburg/1
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)cobrenable.tcl /main/hindenburg/1 17 Sep 1996 Copyright 1996 Cayenne Software Inc.
# Start user added include file section
# End user added include file section
require "enablepage.tcl"
Class CoBrEnablePage : {EnablePage} {
constructor
method destructor
method createInterface
method clearInterface
method fromInterface
method toInterface
}
constructor CoBrEnablePage {class this name} {
set this [EnablePage::constructor $class $this $name]
# Start constructor user section
# End constructor user section
return $this
}
method CoBrEnablePage::destructor {this} {
# Start destructor user section
# End destructor user section
$this EnablePage::destructor
}
method CoBrEnablePage::createInterface {this} {
interface DlgRow $this.NG.DC.DR {
DlgColumn DC {
Label L { text "Selection count"}
OptionMenu selCountOM {
entrySet { "don't care" 0 1 many }
}
}
DlgColumn DC {
Label L { text "Check enable on"}
VerRadioGroup checkOn {
entrySet { "Nothing" "Selection change"
"Level change"}
}
}
}
interface DlgRow $this.NG.DC.DR {
DlgColumn DC {
Label L { text "Script for extra checking" }
MultiLineText enableMLT { }
}
}
}
method CoBrEnablePage::clearInterface {this} {
[$this if].selCountOM selected "don't care"
[$this if].checkOn selected "Nothing"
[$this if].enableMLT text ""
}
method CoBrEnablePage::fromInterface {this} {
set spec ""
set enableScript [[$this if].enableMLT text]
if ![CommandPage::checkBraces $enableScript] {
wmtkerror "Brace mismatch in enableScript"
return ""
}
set selCount [[$this if].selCountOM selected]
if {$selCount != "don't care"} {
set spec "$spec selCount \"$selCount\""
}
set checkOn [[$this if].checkOn selected]
if {$checkOn == "Selection change"} {
set spec "$spec checkOn selectionChange"
} elseif {$checkOn == "Level change"} {
set spec "$spec checkOn levelChange"
}
if {$enableScript != ""} {
set spec "$spec enableScript \{$enableScript\}"
}
return $spec
}
method CoBrEnablePage::toInterface {this key value} {
if {$key == "selCount"} {
[$this if].selCountOM selected $value
}
if {$key == "checkOn"} {
if {$value == "levelChange"} {
[$this if].checkOn selected "Level change"
} elseif {$value == "selectionChange"} {
[$this if].checkOn selected "Selection change"
}
}
if {$key == "enableScript"} {
regsub -all "\n\t\t\t" $value "\n" value
[$this if].enableMLT text [string trim $value]
}
}
# Do not delete this line -- regeneration end marker