home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
openloceda.tcl
< prev
next >
Wrap
Text File
|
1997-04-24
|
4KB
|
138 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: @(#)openloceda.tcl /main/titanic/3
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)openloceda.tcl /main/titanic/3 24 Apr 1997 Copyright 1997 Cayenne Software Inc.
# Start user added include file section
require "openlocobj.tcl"
# End user added include file section
require "custdefsar.tcl"
Class OpenLocEdArea : {CustDefsArea} {
constructor
method destructor
method read
method parseLines
method parseDefs
method newObject
method createObject
method clearArea
method getStrategyType
method setStrategyType
method removeStrategyType
attribute usageDefiner
attribute strategyType
}
constructor OpenLocEdArea {class this name} {
set this [CustDefsArea::constructor $class $this $name]
$this strategyType [Dictionary new]
# Start constructor user section
$this rowCount 12
$this columnCount 80
$this font "[m4_var get M4_font -context uce]"
$this destinationSet "OPENSTGLOC dropEvent"
$this mode DETAIL
BrowsHeader new $this.name -label Strategy -width 25
BrowsHeader new $this.type -label Type -width 20
BrowsHeader new $this.level -label Level -width 25
BrowsHeader new $this.item -label Item -width 5
BrowsHeader new $this.phase -label Phase -width 15
BrowsHeader new $this.file -label File -width 5
BrowsHeader new $this.comp -label Component -width 15
BrowsHeader new $this.label -label Label -width 10
BrowsHeader new $this.cond -label Condition -width 10
# End constructor user section
return $this
}
method OpenLocEdArea::destructor {this} {
# Start destructor user section
# End destructor user section
$this CustDefsArea::destructor
}
method OpenLocEdArea::read {this object type} {
$this readDefs $object $type
$this CustDefsArea::read $object $type
}
method OpenLocEdArea::parseLines {this lines level} {
foreach locLine $lines {
set strategyType [$this getStrategyType [lindex $locLine 0]]
$this createObject [list name [lindex $locLine 0] \
type $strategyType \
itemType [lindex $locLine 1] \
phase [lindex $locLine 2] \
fileType [lindex $locLine 3] \
componentType [lindex $locLine 4] \
labelType [lindex $locLine 5] \
condition [lindex $locLine 6]] \
$level
}
}
method OpenLocEdArea::parseDefs {this lines level} {
foreach defLine $lines {
$this setStrategyType [lindex $defLine 0] [lindex $defLine 1]
}
}
method OpenLocEdArea::newObject {this name {edit 0}} {
$this isChanged 1
set obj [$this createObject [list name $name \
type [$this getStrategyType $name] \
specLevel [$this _level]] \
[$this _level]]
$this sortArea
if $edit {
$obj open
}
}
method OpenLocEdArea::createObject {this objSpec level} {
global classCount
set newIndex [llength [$this objectSet]]
set object [OpenLocObject new $this.Object$classCount $objSpec]
$object index $newIndex
incr classCount
$this adjustCreatedObject $object $level
# update the object-details in the view
$object updateView
return $object
}
method OpenLocEdArea::clearArea {this} {
$this CustDefsArea::clearArea
foreach strategyName [[$this strategyType] names] {
$this removeStrategyType $strategyName
}
}
# Do not delete this line -- regeneration end marker
method OpenLocEdArea::getStrategyType {this strategyName} {
return [[$this strategyType] set $strategyName]
}
method OpenLocEdArea::setStrategyType {this strategyName newStrategyType} {
[$this strategyType] set $strategyName $newStrategyType
}
method OpenLocEdArea::removeStrategyType {this strategyName} {
[$this strategyType] unset $strategyName
}