home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
fileprdbob.tcl
< prev
next >
Wrap
Text File
|
1997-10-16
|
5KB
|
197 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: @(#)fileprdbob.tcl /main/titanic/7
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)fileprdbob.tcl /main/titanic/7 16 Oct 1997 Copyright 1997 Cayenne Software Inc.
# Start user added include file section
# End user added include file section
require "browsdbobj.tcl"
Class FilePRDbObj : {BrowsDbObj FilePropertyReference} {
method destructor
constructor
method promoter
method browserObjType
method browserType
method customLevelVersion
method editFile
method hasChildren
method initializeInfo
method makeUpToDate
method pathName
method previewFile
method selectFixed
method showFile
method versionName
}
method FilePRDbObj::destructor {this} {
# Start destructor user section
# End destructor user section
$this BrowsDbObj::destructor
}
constructor FilePRDbObj {class this name} {
set this [FilePropertyReference::constructor $class $this $name]
set this [BrowsDbObj::constructor $class $this $name]
return $this
}
method FilePRDbObj::promoter {this} {
$this BrowsDbObj::promoter
module_promoter FilePRDbObj $this
}
selfPromoter FilePropertyReference {this} {
FilePRDbObj promote $this
}
proc FilePRDbObj::associations {} {
return {}
}
method FilePRDbObj::browserObjType {this} {
return "FilePRDbObj"
}
method FilePRDbObj::browserType {this} {
return [$this type]
}
proc FilePRDbObj::childTypes {assoc} {
if {[lsearch -exact "[FilePRDbObj::associations]" "$assoc"] == -1} {
return ""
}
return "[BrowserProcs::childTypes $assoc]"
}
proc FilePRDbObj::controlledLists {} {
return ""
}
method FilePRDbObj::customLevelVersion {this} {
return [$this systemVersion]
}
method FilePRDbObj::editFile {this} {
$this edit
}
method FilePRDbObj::hasChildren {this} {
return 0
}
proc FilePRDbObj::infoProperties {} {
return [concat \
[BrowserProcs::infoProperties] \
{Status Version "Controlled Actions" Path} \
]
}
method FilePRDbObj::initializeInfo {this confV} {
[$this info] contents ""
$this setInfo FileVersion [$this referredFileVersion $confV]
}
method FilePRDbObj::makeUpToDate {this} {
# dummy call to server
$this referredFileVersion [$this getParent ConfigVersion]
}
method FilePRDbObj::pathName {this} {
return "[path_name concat \
[[$this document] directory] [$this getPropertyValue fileSystemPath] \
]"
}
method FilePRDbObj::previewFile {this} {
$this preview
}
method FilePRDbObj::selectFixed {this} {
set versionList ""
set file [$this referredFile]
set fileV [[$this info] set FileVersion]
foreach version [$file fileVersions] {
if {"$version" == "$fileV"} continue
lappend versionList $version
}
if [lempty $versionList] {
wmtkinfo "There are no other versions to select from"
return
}
set headerSpecList {
{Version 25 ascii {increasing 1}}
{Status 14 ascii {increasing 2}}
{"Frozen date" 30 ascii {none}}
{Comments 50 ascii {none}}
}
set objectSpecList ""
foreach version $versionList {
set typeSpec [getObjectSpec [$wmttoolObj objectHdlr] \
[$version uiClass] [$version browserType] \
]
if {"$typeSpec" != ""} {
set icon [$typeSpec smallIcon]
} else {
set icon ""
}
lappend objectSpecList [list $icon \
[$version versionName] \
[$version status] \
[$version freezeTime2String] \
[$version comments] \
]
}
require "browsviewd.tcl"
set box $wmttoolObj.selectFixed
ClassMaker::extend BrowsViewDialog SelectFixedBrowsViewDialog dbObj
SelectFixedBrowsViewDialog new $box \
-title "Select Fixed" \
-message "File '[$file name].[$file type]'" \
-headerSpecList $headerSpecList \
-objectSpecList $objectSpecList \
-objectList $versionList \
-dbObj $this \
-cancelPressed {%this delete} \
-okPressed {
set dbObj [%this dbObj]
set version [[lindex [[%this view] selectedSet] 0] object]
set script "$dbObj fixate $version"
set confVId [[$dbObj getParent ConfigVersion] identity]
set sysVId [[$dbObj getParent SystemVersion] identity]
set argsfile [args_file [$dbObj identity]]
set args "updateDocDir $confVId $sysVId [list $argsfile]"
set cmd "$wmttoolObj startDocbatch mtool [list $args] \"\" {0 0} 0"
$wmttoolObj startCommand tcl "$script" "$cmd" "" {1 0} 1
%this delete
}
[$box view] selectionPolicy BROWSE
$box popUp
}
method FilePRDbObj::showFile {this} {
$this show
}
method FilePRDbObj::versionName {this} {
set fileV [[$this info] set FileVersion]
if [$fileV isNil] {
return ""
}
return [$fileV versionName]
}
# Do not delete this line -- regeneration end marker