home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1997 November
/
PCWorld_1997-11_cd.bin
/
software
/
programy
/
komix
/
DATA.Z
/
itempropse.tcl
< prev
next >
Wrap
Text File
|
1996-06-05
|
3KB
|
109 lines
#---------------------------------------------------------------------------
#
# (c) Cadre Technologies Inc. 1996
#
# File: @(#)itempropse.tcl /main/3
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)itempropse.tcl /main/3 5 Jun 1996 Copyright 1996 Cadre Technologies Inc.
# Start user added include file section
# End user added include file section
require "itemprdbob.tcl"
require "propertyse.tcl"
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
}
selfPromoter ItemPRDbObj {this} {
set sysV [$this systemVersion]
if {"[[$sysV system] type]" != "document"} return
set editor [$sysV editor]
if {! [isCommand $editor]} return
set editorName [$editor name]
set editorVersion [$editor version]
set class [Document::getClass $editorName $editorVersion Itemprop]
if {$class != ""} {
$class promote $this $sysV
}
}
method ItempropSection::promoter {this document} {
$this PropertySection::promoter $document
$this uiType Itemprop
}
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