home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
opendefeda.tcl
< prev
next >
Wrap
Text File
|
1997-04-24
|
5KB
|
185 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: @(#)opendefeda.tcl /main/titanic/3
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)opendefeda.tcl /main/titanic/3 24 Apr 1997 Copyright 1997 Cayenne Software Inc.
# Start user added include file section
require "searchstgd.tcl"
require "crfilestgd.tcl"
require "crsysstgde.tcl"
require "userstgdef.tcl"
require "groupstgde.tcl"
global stgAbbr
set stgAbbr(search) Search
set stgAbbr(createFile) CrFile
set stgAbbr(createSystemAndFile) CrSys
set stgAbbr(userDefined) User
set stgAbbr(group) Group
# End user added include file section
require "custdefsar.tcl"
Class OpenDefEdArea : {CustDefsArea} {
constructor
method destructor
method parseLines
method deleteObjects
method newObject
method createSearch
method createCrFile
method createCrSys
method createUser
method createGroup
method createObject
method clearArea
method getStrategy
method setStrategy
method removeStrategy
attribute searchDefiner
attribute crFileDefiner
attribute crSysDefiner
attribute userDefiner
attribute groupDefiner
attribute strategy
}
constructor OpenDefEdArea {class this name} {
set this [CustDefsArea::constructor $class $this $name]
$this strategy [Dictionary new]
# Start constructor user section
$this rowCount 12
$this columnCount 65
$this font "[m4_var get M4_font -context uce]"
$this destinationSet "OPENSTGDEF 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
# End constructor user section
return $this
}
method OpenDefEdArea::destructor {this} {
# Start destructor user section
# End destructor user section
$this CustDefsArea::destructor
}
method OpenDefEdArea::parseLines {this lines level} {
global stgAbbr
foreach defLine $lines {
$this create$stgAbbr([lindex $defLine 1]) $defLine $level
}
}
method OpenDefEdArea::deleteObjects {this objs} {
foreach stg $objs {
$this removeStrategy [$stg name]
}
$this CustDefsArea::deleteObjects $objs
}
method OpenDefEdArea::newObject {this type name {edit 0}} {
$this isChanged 1
set obj [$this createObject [list name $name \
type $type \
specLevel [$this _level]] \
$type [$this _level]]
$this sortArea
if $edit {
$obj open
}
}
method OpenDefEdArea::createSearch {this defs level} {
$this createObject [list name [lindex $defs 0] \
type [lindex $defs 1] \
flags [lindex $defs 2] \
fileTypes [lindex $defs 3]] \
[lindex $defs 1] $level
}
method OpenDefEdArea::createCrFile {this defs level} {
$this createObject [list name [lindex $defs 0] \
type [lindex $defs 1] \
fileQualifier [lindex $defs 2] \
fileName [lindex $defs 3] \
fileType [lindex $defs 4]] \
[lindex $defs 1] $level
}
method OpenDefEdArea::createCrSys {this defs level} {
$this createObject [list name [lindex $defs 0] \
type [lindex $defs 1] \
systemName [lindex $defs 2] \
fileQualifier [lindex $defs 3] \
fileName [lindex $defs 4] \
fileType [lindex $defs 5]] \
[lindex $defs 1] $level
}
method OpenDefEdArea::createUser {this defs level} {
$this createObject [list name [lindex $defs 0] \
type [lindex $defs 1] \
procedure [lindex $defs 2]] \
[lindex $defs 1] $level
}
method OpenDefEdArea::createGroup {this defs level} {
$this createObject [list name [lindex $defs 0] \
type [lindex $defs 1] \
members [lindex $defs 2]] \
[lindex $defs 1] $level
}
method OpenDefEdArea::createObject {this objSpec type level} {
global stgAbbr
global classCount
set newIndex [llength [$this objectSet]]
set object [$stgAbbr($type)StgDef new $this.Object$classCount $objSpec]
$this setStrategy [$object name] $object
$object index $newIndex
incr classCount
$this adjustCreatedObject $object $level
# update the object-details in the view
$object updateView
return $object
}
method OpenDefEdArea::clearArea {this} {
$this CustDefsArea::clearArea
foreach stg [[$this strategy] names] {
$this removeStrategy $stg
}
}
# Do not delete this line -- regeneration end marker
method OpenDefEdArea::getStrategy {this name} {
return [[$this strategy] set $name]
}
method OpenDefEdArea::setStrategy {this name newStrategy} {
[$this strategy] set $name $newStrategy
}
method OpenDefEdArea::removeStrategy {this name} {
[$this strategy] unset $name
}