home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1997 November
/
PCWorld_1997-11_cd.bin
/
software
/
programy
/
komix
/
DATA.Z
/
wbpropcont.tcl
< prev
next >
Wrap
Text File
|
1996-05-29
|
3KB
|
106 lines
#---------------------------------------------------------------------------
#
# (c) Cadre Technologies Inc. 1996
#
# File: @(#)wbpropcont.tcl 1.8
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)wbpropcont.tcl 1.8 13 Mar 1996 Copyright 1996 Cadre Technologies Inc.
# Start user added include file section
# End user added include file section
require "propcontai.tcl"
Class WbPropContainer : {PropContainer} {
constructor
method destructor
method existPropertyHolder
method loadProperties
method editProperties
method saveProperties
method quitProperties
method changeProperty
method getPropertyValue
method isPropertyEditable
method removeProperties
method removeProperty
attribute propInfo
attribute propHolder
}
constructor WbPropContainer {class this} {
set this [PropContainer::constructor $class $this]
# Start constructor user section
$this propInfo [PIPropInfo new]
# End constructor user section
return $this
}
method WbPropContainer::destructor {this} {
# Start destructor user section
[$this propInfo] delete
# End destructor user section
$this PropContainer::destructor
}
method WbPropContainer::existPropertyHolder {this} {
return 1
}
method WbPropContainer::loadProperties {this} {
[$this propInfo] load [$this propHolder]
}
method WbPropContainer::editProperties {this} {
[$this propInfo] edit [$this propHolder]
}
method WbPropContainer::saveProperties {this} {
[$this propInfo] save
}
method WbPropContainer::quitProperties {this} {
[$this propInfo] quit
}
method WbPropContainer::changeProperty {this name value defVal} {
if [string compare $value $defVal] {
[$this propInfo] changeProperty $name $value
} else {
[$this propInfo] removeProperty $name
}
}
method WbPropContainer::getPropertyValue {this name} {
return [[$this propInfo] getProperty $name]
}
method WbPropContainer::isPropertyEditable {this name} {
return [$this editable]
}
method WbPropContainer::removeProperties {this} {
[$this propInfo] edit [$this propHolder]
[$this propDefinitionSet] foreach propDef {
$this removeProperty $propDef
}
[$this propInfo] save
[$this propInfo] quit
}
method WbPropContainer::removeProperty {this def} {
set members [$def memberSet]
if {$members == ""} {
[$this propInfo] removeProperty [$def name]
} else {
foreach member $members {
$this removeProperty $member
}
}
}
# Do not delete this line -- regeneration end marker