home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
svdgvdbobj.tcl
< prev
next >
Wrap
Text File
|
1997-10-16
|
6KB
|
247 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: @(#)svdgvdbobj.tcl /main/titanic/11
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)svdgvdbobj.tcl /main/titanic/11 16 Oct 1997 Copyright 1997 Cayenne Software Inc.
# Start user added include file section
# End user added include file section
require "browsdbobj.tcl"
Class SvdGVDbObj : {BrowsDbObj SavedGroupVersion} {
method destructor
constructor
method createTime2String
method customLevelVersion
method inCorporate2String
method makeCorporate
method makeCorporateAllowed
method makeUpToDate
method name
method newObjects
method phaseName
method printObjects
method projectName
method removeObjects
method removeVersion
method systemName
method versionInLabel
method versionName
}
method SvdGVDbObj::destructor {this} {
# Start destructor user section
# End destructor user section
$this BrowsDbObj::destructor
}
constructor SvdGVDbObj {class this name} {
set this [SavedGroupVersion::constructor $class $this $name]
set this [BrowsDbObj::constructor $class $this $name]
return $this
}
selfPromoter SavedGroupVersion {this} {
SvdGVDbObj promote $this
}
proc SvdGVDbObj::associations {} {
return {fileVersions}
}
proc SvdGVDbObj::childTypes {assoc} {
if {[lsearch -exact "[SvdGVDbObj::associations]" "$assoc"] == -1} {
return ""
}
set childTypes [BrowserProcs::childTypes $assoc]
case "$childTypes" in {
{FileVersion} {
return [concat \
${BrowserProcs::diagramFileTypes} \
${BrowserProcs::programmerFileTypes}]
}
{default} {
return "$childTypes"
}
}
}
proc SvdGVDbObj::controlledLists {} {
return ""
}
method SvdGVDbObj::createTime2String {this} {
return [BrowserProcs::displayDate [$this createTime]]
}
method SvdGVDbObj::customLevelVersion {this} {
set corpGV [$this corporateGroupVersion]
if {! [$corpGV isNil]} {
return [$corpGV customLevelVersion]
}
set sysV [[ClientContext::global] currentSystem]
if [$sysV isNil] {
return $sysV
}
if {[$sysV system] != [$this system]} {
return [ORB::nil]
}
return $sysV
}
method SvdGVDbObj::inCorporate2String {this} {
if [[$this corporateGroupVersion] isNil] {
return "No"
}
return "Yes"
}
proc SvdGVDbObj::infoProperties {} {
return [concat \
[BrowserProcs::infoProperties] \
{Version Comments Created "Created By" "In Corporate" \
Project Phase System "Controlled Actions"} \
]
}
method SvdGVDbObj::makeCorporate {this} {
require "newobjentr.tcl"
set box $wmttoolObj.makeCorporate
NewObjEntryDlg new $box \
-title "Make Corporate" \
-message "Corporate Group Name:" \
-dbObj $this \
-cancelPressed {%this delete} \
-okPressed {
set name [%this entry]
set comments [%this.top.comments text]
set script "[%this dbObj] toCorporate [list $comments] [list $name]"
$wmttoolObj startCommand tcl \
"$script" "" \
"Creating corporate group version '$name'..." \
{1 0} 1
%this delete
}
Label new $box.top.commentsLab \
-text "Comments:"
SingleLineText new $box.top.comments
set corpG [[$this savedGroup] corporateGroup]
if [$corpG isNil] {
$box entry "[$this name]"
$box.top.name sensitive 1
} else {
$box entry "[$corpG name]"
$box.top.name sensitive 0
}
$box popUp
}
method SvdGVDbObj::makeCorporateAllowed {this} {
if {! [[$this corporateGroupVersion] isNil]} {
return 0
}
set sysV [$this getParent SystemVersion]
if {"$sysV" == ""} {
return 0
}
if {[$sysV getInfo Status] == "backGround"} {
return 0
}
return 1
}
method SvdGVDbObj::makeUpToDate {this} {
# dummy call to server
$this corporateGroupVersion
}
method SvdGVDbObj::name {this} {
return "[[$this savedGroup] name]"
}
method SvdGVDbObj::newObjects {this} {
set sysV [$this getParent SystemVersion]
if {"$sysV" == ""} {
wmtkerror "Cannot access corporate FileVersion(s)"
return
}
$sysV newObjects
}
method SvdGVDbObj::phaseName {this} {
return [[[$this system] phase] name]
}
method SvdGVDbObj::printObjects {this} {
set asciiFiles ""
set topostObjects ""
foreach obj [$wmttoolObj selectedObjSet] {
if [$obj isA Graph] {
lappend topostObjects $obj
} elseif [$obj isA ExternalFileVersion] {
$obj synchWithFileSystem
lappend asciiFiles [$obj path]
}
}
BrowserProcs::printObjects $asciiFiles $topostObjects
}
method SvdGVDbObj::projectName {this} {
return [[$this project] name]
}
method SvdGVDbObj::removeObjects {this} {
set sysV [$this getParent SystemVersion]
if {"$sysV" == ""} {
wmtkerror "Cannot access corporate FileVersion(s)"
return
}
$sysV removeObjects
}
method SvdGVDbObj::removeVersion {this} {
set box $wmttoolObj.removeVersionWarning
YesNoWarningDialog new $box \
-title "Confirm Version Delete" \
-message [BrowserProcs::removeMessage] \
-helpPressed {.main helpOnName removeVersionWarning} \
-noPressed {%this delete} \
-yesPressed {
set script ""
foreach obj [$wmttoolObj selectedObjSet] {
if {"$script" != ""} {
append script " ;"
}
append script " [$obj savedGroup] removeVersion $obj"
}
$wmttoolObj startCommand tcl "$script" "" "" {1 0} 1
%this delete
}
$box delCancelButton
$box popUp
}
method SvdGVDbObj::systemName {this} {
return [[$this system] name]
}
method SvdGVDbObj::versionInLabel {this} {
return 1
}
method SvdGVDbObj::versionName {this} {
return [$this versionNumber]
}
# Do not delete this line -- regeneration end marker