home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
repbackupd.tcl
< prev
next >
Wrap
Text File
|
1997-09-04
|
4KB
|
128 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: @(#)repbackupd.tcl /main/titanic/8
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)repbackupd.tcl /main/titanic/8 4 Sep 1997 Copyright 1997 Cayenne Software Inc.
# Start user added include file section
require "stepcolumn.tcl"
require "repdumpcor.tcl"
require "repdumppro.tcl"
require "repdumpmod.tcl"
require "reparchcor.tcl"
require "reparchpro.tcl"
require "reparchmod.tcl"
# End user added include file section
require "reptooldia.tcl"
Class RepBackupDialog : {RepToolDialog} {
constructor
method destructor
method dumpObject
method archiveObject
method getDumpDlg
method setDumpDlg
method removeDumpDlg
method getArchiveDlg
method setArchiveDlg
method removeArchiveDlg
attribute object
attribute dumpDlg
attribute archiveDlg
}
constructor RepBackupDialog {class this name view i_object} {
set this [RepToolDialog::constructor $class $this $name $view]
$this object $i_object
$this dumpDlg [Dictionary new]
$this archiveDlg [Dictionary new]
# Start constructor user section
$this delCancelButton
set object $i_object
switch -- $object {
Corporate { set title "Backup Entire Corporate" }
Project { set title "Backup Single Project" }
Model { set title "Backup Single Model" }
}
$this config \
-title $title \
-helpPressed { [%this view] helpOnName backupRepository }
StepColumn new $this.steps
$this.steps addStep Dump. Dump... \
"Dumps the $object tables into the $object's\
\nDBDUMP directory in the repository directory." \
"$this dumpObject $object"
$this.steps addStep Archive. Archive... \
"Creates an archive file from the $object directory.\
\nTo get a consistent dump, it is required to archive\
\nthe directory directly after dumping it." \
"$this archiveObject $object"
# End constructor user section
return $this
}
method RepBackupDialog::destructor {this} {
# Start destructor user section
# End destructor user section
$this RepToolDialog::destructor
}
method RepBackupDialog::dumpObject {this object} {
set dlg [$this getDumpDlg $object]
if {$dlg == ""} {
set dlgName RepDump${object}Dialog
set dlg [$dlgName new [$this view].$dlgName [$this view]]
$this setDumpDlg $object $dlg
}
$dlg popUp
}
method RepBackupDialog::archiveObject {this object} {
set dlg [$this getArchiveDlg $object]
if {$dlg == ""} {
set dlgName RepArch${object}Dialog
set dlg [$dlgName new [$this view].$dlgName [$this view]]
$this setArchiveDlg $object $dlg
}
$dlg popUp
}
# Do not delete this line -- regeneration end marker
method RepBackupDialog::getDumpDlg {this object} {
return [[$this dumpDlg] set $object]
}
method RepBackupDialog::setDumpDlg {this object newDumpDlg} {
[$this dumpDlg] set $object $newDumpDlg
}
method RepBackupDialog::removeDumpDlg {this object} {
[$this dumpDlg] unset $object
}
method RepBackupDialog::getArchiveDlg {this object} {
return [[$this archiveDlg] set $object]
}
method RepBackupDialog::setArchiveDlg {this object newArchiveDlg} {
[$this archiveDlg] set $object $newArchiveDlg
}
method RepBackupDialog::removeArchiveDlg {this object} {
[$this archiveDlg] unset $object
}