home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1997 November
/
PCWorld_1997-11_cd.bin
/
software
/
programy
/
komix
/
DATA.Z
/
versionobj.tcl
< prev
next >
Wrap
Text File
|
1996-09-20
|
4KB
|
140 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1996
#
# File: @(#)versionobj.tcl /main/hindenburg/7
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)versionobj.tcl /main/hindenburg/7 20 Sep 1996 Copyright 1996 Cayenne Software Inc.
# Start user added include file section
# End user added include file section
Class VersionObj : {Object} {
constructor
method destructor
method createTime2String
method freezeTime2String
method updateTime2String
method selectVersion
method deselectVersion
method createdBy
method cutVersion
}
constructor VersionObj {class this name} {
set this [Object::constructor $class $this $name]
# Start constructor user section
# End constructor user section
return $this
}
method VersionObj::destructor {this} {
# Start destructor user section
# End destructor user section
}
method VersionObj::createTime2String {this} {
return [BrowserProcs::displayDate [$this createTime]]
}
method VersionObj::freezeTime2String {this} {
return [BrowserProcs::displayDate [$this freezeTime]]
}
method VersionObj::updateTime2String {this} {
return [BrowserProcs::displayDate [$this updateTime]]
}
method VersionObj::selectVersion {this version {confV ""}} {
if [$version isA CorporateGroupVersion] {
if {"$confV" == ""} {
set confV [$this getParent ConfigVersion]
}
$this reuse $version $confV
return
}
if [$version isA PhaseVersion] {
set flag "-phaseVersion"
} elseif [$version isA SystemVersion] {
set flag "-systemVersion"
} elseif [$version isA FileVersion] {
set flag "-fileVersion"
} elseif [$version isA GroupVersion] {
set flag "-groupVersion"
} else {
set flag ""
}
eval $this select $flag $version
if [$version isA Document] {
if {"$confV" == ""} {
set confV [$this getParent ConfigVersion]
}
$version initialize $confV
$version parent $this
$version updateDocDir all 0
}
}
method VersionObj::deselectVersion {this version} {
if [$version isA CorporateGroupVersion] {
$this unuse $version
return
}
if [$version isA PhaseVersion] {
set flag "-phaseVersion"
} elseif [$version isA SystemVersion] {
set flag "-systemVersion"
if [$version isA Document] {
if {"[$version getInfo Status]" != "frozen"} {
$version freeze "Frozen for deactivation"
}
$version removeDocDir
}
} elseif [$version isA FileVersion] {
set flag "-fileVersion"
} elseif [$version isA GroupVersion] {
set flag "-groupVersion"
} else {
set flag ""
}
eval $this deselect $flag $version
}
method VersionObj::createdBy {this} {
return [[$this creator] name]
}
method VersionObj::cutVersion {this version} {
# Skip if version is not selected any more
if [$version isA SystemVersion] {
set link [$this findSystemVersionLink -bySystemVersion $version]
} elseif [$version isA FileVersion] {
set link [$this findFileVersionLink -byFileVersion $version]
} elseif [$version isA GroupVersion] {
set link [$this findGroupVersionLink -byVersion $version]
} else {
return
}
if [$link isNil] {
return
}
wmtkmessage "\
Deselecting [$version getInfo Type] '[$version getInfo Name]'\
from [$this getInfo Type] '[$this getInfo Name]'"
$this deselectVersion $version
[.main undoCommand] sourceObj $this
[.main undoCommand] addSource $version
wmtkmessage ""
}
# Do not delete this line -- regeneration end marker