home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
versionobj.tcl
< prev
next >
Wrap
Text File
|
1997-09-29
|
4KB
|
130 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: @(#)versionobj.tcl /main/titanic/7
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)versionobj.tcl /main/titanic/7 29 Sep 1997 Copyright 1997 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 cutVersion
method makeUpToDate
}
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
module_proc VersionObj::selectVersion $this $version $confV
}
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"
} elseif [$version isA FileVersion] {
set flag "-fileVersion"
} elseif [$version isA GroupVersion] {
set flag "-groupVersion"
} else {
set flag ""
}
module_proc VersionObj::deselectVersion $version
eval $this deselect $flag $version
}
method VersionObj::cutVersion {this version} {
busy {
# 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 ""
}
}
method VersionObj::makeUpToDate {this} {
# dummy call to server
$this currentContext
}
# Do not delete this line -- regeneration end marker