home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
repdumppro.tcl
< prev
next >
Wrap
Text File
|
1997-11-28
|
3KB
|
100 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: @(#)repdumppro.tcl /main/titanic/8
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)repdumppro.tcl /main/titanic/8 28 Nov 1997 Copyright 1997 Cayenne Software Inc.
# Start user added include file section
require "repprojbro.tcl"
# End user added include file section
require "repdumpobj.tcl"
Class RepDumpProjectDialog : {RepDumpObjDialog} {
constructor
method destructor
method browseObjects
method setObject
method pressedOk
method dump
method objType
method objDescription
}
constructor RepDumpProjectDialog {class this name view} {
set this [RepDumpObjDialog::constructor $class $this $name $view]
# Start constructor user section
$this config \
-title "Dump Single Project" \
-helpPressed "$view helpOnName dumpProject"
[$this nameLabel] text "Project Name"
# End constructor user section
return $this
}
method RepDumpProjectDialog::destructor {this} {
# Start destructor user section
# End destructor user section
$this RepDumpObjDialog::destructor
}
method RepDumpProjectDialog::browseObjects {this} {
set dlg [$this view].selectdumpprojectbrowser
if ![isCommand $dlg] {
RepProjBrowser new $dlg [$this view] \
-okPressed "$this setObject \[\[%this selected] label]"
}
$dlg popUp
}
method RepDumpProjectDialog::setObject {this name} {
[$this nameField] text $name
$this checkOk
}
method RepDumpProjectDialog::pressedOk {this} {
set rep [[$this view] rep]
set corp [$rep checkCorporate]
set projectName [[$this nameField] text]
set proj [$corp findProject $projectName]
if [$proj isNil] {
$this error "Project '$projectName' does not exist."
return
}
# Save this for the archive dialog.
$this dumpDirectory [$rep currentObjDir $proj]
$this dumpedObject $proj
$this RepDumpObjDialog::pressedOk
}
method RepDumpProjectDialog::dump {this dbInfo} {
upvar $dbInfo info
set rep [[$this view] rep]
set projectName [[$this nameField] text]
return [$rep dumpObject "$this dumpFinished" info {} \
"project" [list $projectName]]
}
method RepDumpProjectDialog::objType {this} {
return "Project"
}
method RepDumpProjectDialog::objDescription {this} {
return "project '[[$this nameField] text]'"
}
# Do not delete this line -- regeneration end marker