home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
viewobject.tcl
< prev
next >
Wrap
Text File
|
1997-03-14
|
3KB
|
109 lines
#---------------------------------------------------------------------------
#
# (c) Cadre Technologies Inc. 1996
#
# File: @(#)viewobject.tcl /main/titanic/2
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)viewobject.tcl /main/titanic/2 14 Mar 1997 Copyright 1996 Cadre Technologies Inc.
# Start user added include file section
require "custsort.tcl"
# End user added include file section
require "custbrowso.tcl"
Class ViewObject : {CustBrowsObject BrowsObject} {
method destructor
constructor
method updateView
method infoList
method validEnvironment
method open
attribute repositoryType
attribute browserType
attribute redefined
}
method ViewObject::destructor {this} {
# Start destructor user section
# End destructor user section
$this CustBrowsObject::destructor
}
constructor ViewObject {class this name specification} {
set this [BrowsObject::constructor $class $this $name]
set this [CustBrowsObject::constructor $class $this $name]
$this smallIcon folder_16
$this largeIcon folder_32
$this activated {%this open}
while {![lempty $specification]} {
set key [lvarpop specification]
$this $key [lvarpop specification]
}
# give the name of the object the name of the view
$this displayName [$this name]
# type is always ViewObject
$this type ViewObject
return $this
}
method ViewObject::updateView {this} {
if [$this editable] {
set level "[$this specLevel] *"
} else {
set level [$this specLevel]
}
$this label [$this repositoryType]
$this details [list [$this browserType] \
[$this _displayName] \
$level \
[$this scope]]
}
method ViewObject::infoList {this} {
set list [$this CustBrowsObject::infoList]
lappend list repositoryType [$this repositoryType]
lappend list browserType [$this browserType]
return $list
}
method ViewObject::validEnvironment {this curPath} {
set objScope [$this scope]
# extract corporate
set curPathLen [expr {[llength $curPath]-1}]
if {$curPathLen != [llength $objScope]} {
return 0
}
return [$this validScope $curPath]
}
method ViewObject::open {this} {
.main busy TRUE
set definer [[.main editorArea] viewDefiner]
if {[catch {$definer load $this}]} {
set definer [ViewDefineDialog new .main.viewDefiner]
[.main editorArea] viewDefiner $definer
$definer load $this
}
.main busy FALSE
}
# Do not delete this line -- regeneration end marker