home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # (c) Cadre Technologies Inc. 1996
- #
- # File: @(#)objectobje.tcl /main/3
- # Author: <generated>
- # Description:
- #---------------------------------------------------------------------------
- # SccsId = @(#)objectobje.tcl /main/3 12 Jun 1996 Copyright 1996 Cadre Technologies Inc.
-
- # Start user added include file section
- require "custsort.tcl"
- # End user added include file section
-
- require "custbrowso.tcl"
-
- Class ObjectObject : {BrowsObject CustBrowsObject} {
- method destructor
- constructor
- method updateView
- method open
- attribute browserType
- attribute redefined
- }
-
- method ObjectObject::destructor {this} {
- # Start destructor user section
- # End destructor user section
- $this CustBrowsObject::destructor
- }
-
- constructor ObjectObject {class this name specification} {
-
- set this [BrowsObject::constructor $class $this $name]
- set this [CustBrowsObject::constructor $class $this $name]
-
- $this activated {%this open}
-
- $this smallIcon undef_16
- $this largeIcon undef_32
-
- while {![lempty $specification]} {
- set key [lvarpop specification]
- $this $key [lvarpop specification]
- }
-
- $this displayName [$this name]
- # type is always ObjectObject
- $this type ObjectObject
-
- return $this
- }
-
- method ObjectObject::updateView {this} {
-
- #give the name of the object the name of the view
- set specification [$this objSpec]
- # get the icon from the spec to use in the view
- while {![lempty $specification]} {
- set key [lvarpop specification]
- set value [lvarpop specification]
- if {$key == "largeIcon"} {
- $this largeIcon $value
- }
- if {$key == "smallIcon"} {
- $this smallIcon $value
- }
- }
-
- if [$this editable] {
- set level "[$this specLevel] *"
- } else {
- set level [$this specLevel]
- }
-
- $this label [$this _displayName]
- $this details " \"[$this browserType]\" \
- \"$level\" \
- \"[$this scope]\""
- }
-
- method ObjectObject::open {this} {
-
- if {![$this editable]} {
- return
- }
-
- .main busy TRUE
- set definer [[.main editorArea] objectDefiner]
-
- if {[catch {$definer load $this}]} {
- set definer [ObjectDefineDialog new .main.objectDefiner]
- [.main editorArea] objectDefiner $definer
- $definer load $this
- }
- .main busy FALSE
- }
-
- # Do not delete this line -- regeneration end marker
-
-