home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # (c) Cayenne Software Inc. 1997
- #
- # File: @(#)itempropse.tcl /main/titanic/7
- # Author: <generated>
- # Description:
- #---------------------------------------------------------------------------
- # SccsId = @(#)itempropse.tcl /main/titanic/7 5 Sep 1997 Copyright 1997 Cayenne Software Inc.
-
- # Start user added include file section
- # End user added include file section
-
- require "itemprdbob.tcl"
- require_module_file "propertyse.tcl" docwriter
-
- Class ItempropSection : {ItemPRDbObj PropertySection} {
- method destructor
- constructor
- method promoter
- method edit
- method makeCurrent
- method makeSnapshot
- method uiName
- method docTitle
- }
-
- method ItempropSection::destructor {this} {
- # Start destructor user section
- # End destructor user section
- $this ItemPRDbObj::destructor
- $this PropertySection::destructor
- }
-
- constructor ItempropSection {class this name document} {
- set this [ItemPRDbObj::constructor $class $this $name]
- set this [PropertySection::constructor $class $this $name $document]
- return $this
- }
-
- proc ItempropSection::validDocument {obj} {
-
- set document [$obj systemVersion]
- if {"[[$document system] type]" != "document"} {return 0}
-
- set editor [$document editor]
- if {! [isCommand $editor]} {return 0}
-
- return 1
- }
-
- method ItempropSection::promoter {this} {
-
- $this ItemPRDbObj::promoter
-
- if {![ItempropSection::validDocument $this]} {
- return
- }
-
- $this extension txt
-
- set document [$this systemVersion]
- set editor [$document editor]
-
- $this document $document
- $this uiType Itemprop
- set editorName [$editor name]
- set editorVersion [$editor version]
- set class [Document::getClass $editorName $editorVersion Itemprop]
-
- if {$class != "" && ![$this isA $class]} {
- $class promote $this
- }
-
- # now promote to DocSection
- DocSection::promoter $this
- }
-
- method ItempropSection::edit {this} {
- $this PropertySection::edit
- }
-
- method ItempropSection::makeCurrent {this} {
- set cv [[$this document] configVersion]
- $this status current $cv
- }
-
- method ItempropSection::makeSnapshot {this} {
- set cv [[$this document] configVersion]
- $this status snapshot $cv
- }
-
- method ItempropSection::uiName {this args} {
- return [$this PropertySection::uiName $args]
- }
-
- method ItempropSection::docTitle {this} {
-
- set title "Properties of item"
- set item [$this referredItem]
- if {! [$item isNil]} {
- set title "$title '[$item name].[$item type]'"
- set cv [[$this document] configVersion]
- set itemKeeper [$this referredItemKeeper $cv]
- if {! [$itemKeeper isNil]} {
- if [$itemKeeper isA SystemVersion] {
- set kind system
- set name [[$itemKeeper system] name]
- set title "$title from system '$name'"
- } else {
- set name [[$itemKeeper file] name]
- set type [[$itemKeeper file] type]
- set title "$title from file '$name.$type'"
- }
- } else {
- set title "$title from <unknown>"
- }
- } else {
- set title "$title <unknown>"
- }
- return $title
- }
-
- # Do not delete this line -- regeneration end marker
-
-