home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
represtpro.tcl
< prev
next >
Wrap
Text File
|
1997-11-28
|
3KB
|
106 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: @(#)represtpro.tcl /main/titanic/11
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)represtpro.tcl /main/titanic/11 28 Nov 1997 Copyright 1997 Cayenne Software Inc.
# Start user added include file section
# End user added include file section
require "represtobj.tcl"
Class RepRestProjectDialog : {RepRestObjDialog} {
constructor
method destructor
method browseObjects
method setOverwrite
method objType
method objDescription
method pressedOk
method restore
method restoreFinished
}
constructor RepRestProjectDialog {class this name view} {
set this [RepRestObjDialog::constructor $class $this $name $view]
# Start constructor user section
$this config \
-title "Restore Single Project" \
-helpPressed "$view helpOnName restoreProject"
[$this dirLabel] text "From Project Directory\
(created by unarchive command)"
[$this nameLabel] text "New Project Name\
(taken from dump if not specified)"
[$this overwriteLabel] text "Overwrite Project\
(not overwritten if not specified)"
# End constructor user section
return $this
}
method RepRestProjectDialog::destructor {this} {
# Start destructor user section
# End destructor user section
$this RepRestObjDialog::destructor
}
method RepRestProjectDialog::browseObjects {this} {
set dlg [$this view].selectrestprojectbrowser
if ![isCommand $dlg] {
RepProjBrowser new $dlg [$this view] \
-okPressed "$this setOverwrite \[\[%this selected] label]"
}
$dlg popUp
}
method RepRestProjectDialog::setOverwrite {this name} {
[$this overwriteField] text $name
$this checkOverwrite old
$this checkOk
}
method RepRestProjectDialog::objType {this} {
return "Project"
}
method RepRestProjectDialog::objDescription {this} {
return "project '[[$this nameField] text]'"
}
method RepRestProjectDialog::pressedOk {this} {
$this RepRestObjDialog::pressedOk
}
method RepRestProjectDialog::restore {this dbInfo} {
upvar $dbInfo info
set rep [[$this view] rep]
set opts {}
set projDir [[$this dirField] text]
# Only one of newName and overwriteName can ever be specified.
#
set newName [[$this nameField] text]
set overwriteName [[$this overwriteField] text]
if [string length $overwriteName] {
set newName $overwriteName
append opts " -o"
}
return [$rep restoreObject "$this restoreFinished" info $opts \
"project" $projDir $newName]
}
method RepRestProjectDialog::restoreFinished {this exitCode} {
$this RepRestObjDialog::restoreFinished $exitCode
}
# Do not delete this line -- regeneration end marker