home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
repdumpmod.tcl
< prev
next >
Wrap
Text File
|
1997-11-28
|
3KB
|
108 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: @(#)repdumpmod.tcl /main/titanic/9
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)repdumpmod.tcl /main/titanic/9 28 Nov 1997 Copyright 1997 Cayenne Software Inc.
# Start user added include file section
require "repmodelbr.tcl"
# End user added include file section
require "repdumpobj.tcl"
Class RepDumpModelDialog : {RepDumpObjDialog} {
constructor
method destructor
method browseObjects
method setObject
method pressedOk
method dump
method objType
method objDescription
}
constructor RepDumpModelDialog {class this name view} {
set this [RepDumpObjDialog::constructor $class $this $name $view]
# Start constructor user section
$this config \
-title "Dump Single Model" \
-helpPressed "$view helpOnName dumpModel"
[$this nameLabel] text "Model Name"
# End constructor user section
return $this
}
method RepDumpModelDialog::destructor {this} {
# Start destructor user section
# End destructor user section
$this RepDumpObjDialog::destructor
}
method RepDumpModelDialog::browseObjects {this} {
set dlg [$this view].selectdumpmodelbrowser
if ![isCommand $dlg] {
RepModelBrowser new $dlg [$this view] \
-okPressed "$this setObject \[%this selectedObject]"
}
$dlg popUp
}
method RepDumpModelDialog::setObject {this model} {
[$this nameField] text [$model name].[$model type]
$this checkOk
}
method RepDumpModelDialog::objType {this} {
return "Model"
}
method RepDumpModelDialog::objDescription {this} {
return "model '[[$this nameField] text]'"
}
method RepDumpModelDialog::pressedOk {this} {
set rep [[$this view] rep]
set corp [$rep checkCorporate]
set modelName [[$this nameField] text]
set nt [RepModelBrowser::splitModelName $modelName]
set name [lindex $nt 0]
set type [lindex $nt 1]
set model [$corp findModel $name $type]
if [$model isNil] {
$this error "Model '$modelName' does not exist."
return
}
# Save this for the archive dialog.
$this dumpDirectory [$rep currentObjDir $model]
$this dumpedObject $model
$this RepDumpObjDialog::pressedOk
}
method RepDumpModelDialog::dump {this dbInfo} {
upvar $dbInfo info
set rep [[$this view] rep]
set modelName [[$this nameField] text]
return [$rep dumpObject "$this dumpFinished" info {} \
"model" [quoteIf $modelName]]
}
# Do not delete this line -- regeneration end marker