home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1997 November
/
PCWorld_1997-11_cd.bin
/
software
/
programy
/
komix
/
DATA.Z
/
newcustobj.tcl
< prev
next >
Wrap
Text File
|
1996-06-12
|
2KB
|
88 lines
#---------------------------------------------------------------------------
#
# (c) Cadre Technologies Inc. 1996
#
# File: @(#)newcustobj.tcl /main/3
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)newcustobj.tcl /main/3 12 Jun 1996 Copyright 1996 Cadre Technologies Inc.
# Start user added include file section
# End user added include file section
Class NewCustObjectDialog : {TemplateDialog} {
constructor
method destructor
method doEdit
method checkList
method checkSensitive
attribute edit
attribute _curSensitiveState
attribute _checkList
}
constructor NewCustObjectDialog {class this name} {
set this [TemplateDialog::constructor $class $this $name]
# Start constructor user section
$this modal TRUE
$this edit 0
PushButton new $this.edit \
-label Edit \
-activated "$this doEdit"
# End constructor user section
return $this
}
method NewCustObjectDialog::destructor {this} {
# Start destructor user section
# End destructor user section
}
method NewCustObjectDialog::doEdit {this} {
$this edit 1
eval [$this okPressed]
$this edit 0
}
method NewCustObjectDialog::checkList {this listToCheck} {
$this _checkList $listToCheck
foreach entry [$this _checkList] {
[lindex $entry 0] [lindex $entry 1] "$this checkSensitive"
}
$this checkSensitive
}
method NewCustObjectDialog::checkSensitive {this} {
set newSensitiveState 0
foreach entry [$this _checkList] {
if {[string trim [[lindex $entry 0] [lindex $entry 2]]] == ""} {
set newSensitiveState 1
break
}
}
if { [$this _curSensitiveState] == $newSensitiveState } {
return
}
$this _curSensitiveState $newSensitiveState
if $newSensitiveState {
$this.edit sensitive 0
$this okSensitive 0
$this cancelDefault 1
} else {
$this.edit sensitive 1
$this okSensitive 1
$this okDefault 1
}
}
# Do not delete this line -- regeneration end marker