home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
modeldbobj.tcl
< prev
next >
Wrap
Text File
|
1997-11-28
|
3KB
|
131 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: @(#)modeldbobj.tcl /main/titanic/7
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)modeldbobj.tcl /main/titanic/7 28 Nov 1997 Copyright 1997 Cayenne Software Inc.
# Start user added include file section
# End user added include file section
require "browsdbobj.tcl"
Class ModelDbObj : {BrowsDbObj Model} {
method destructor
constructor
method changeReservation
method createTime2String
method hasChildren
method open
method reserveTime2String
method currentUserNames
}
method ModelDbObj::destructor {this} {
# Start destructor user section
# End destructor user section
$this BrowsDbObj::destructor
}
constructor ModelDbObj {class this name} {
set this [Model::constructor $class $this $name]
set this [BrowsDbObj::constructor $class $this $name]
return $this
}
selfPromoter Model {this} {
ModelDbObj promote $this
}
proc ModelDbObj::associations {} {
return {}
}
method ModelDbObj::changeReservation {this} {
# Cause a call to the server to make sure the value of the
# (cached!) attributes are upToDate.
#
[$this corporate] models
if [$this reserved] {
set cls ModelUnreserveDialog
set dlg .main.unreserveModel
} else {
set cls ModelReserveDialog
set dlg .main.reserveModel
}
if ![isCommand $dlg] {
require "[string tolower [string range $cls 0 9]].tcl"
$cls new $dlg \
-okPressed "busy {%this ok} ; .main updateView" \
-cancelPressed "%this cancel" \
-helpPressed ".main helpOnName changeReservation"
}
$dlg model $this
$dlg popUp
}
proc ModelDbObj::childTypes {assoc} {
if {[lsearch -exact "[ModelDbObj::associations]" "$assoc"] == -1} {
return ""
}
return "[BrowserProcs::childTypes $assoc]"
}
proc ModelDbObj::controlledLists {} {
return {}
}
method ModelDbObj::createTime2String {this} {
return [BrowserProcs::displayDate [$this createTime]]
}
method ModelDbObj::hasChildren {this} {
return 0
}
proc ModelDbObj::infoProperties {} {
return [concat \
[BrowserProcs::infoProperties] \
{Created "Created By" Reserved "Reserved By" "Reservation Comments"
"Current Users" "Controlled Actions"} \
]
}
method ModelDbObj::open {this {exclusively 0}} {
set command [m4_path_name bin grndwrks$EXE_EXT]
set args " "
if $exclusively {
append args "/a exc "
} else {
append args "/a nonexc "
}
append args "/u [quoteIf [ORB::currentUser]] "
append args "/r [quoteIf [[.main corporateObj] name]] "
append args "/m [quoteIf [$this name]]"
.main startCommand extern \
"$command $args" "" "Starting '$command'..." {0 0} 0
}
method ModelDbObj::reserveTime2String {this} {
return [BrowserProcs::displayDate [$this reserveTime]]
}
method ModelDbObj::currentUserNames {this} {
set names {}
foreach user [$this currentUsers] {
lappend names [$user name]
}
return $names
}
# Do not delete this line -- regeneration end marker