home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
repdumpdia.tcl
< prev
next >
Wrap
Text File
|
1997-11-28
|
3KB
|
137 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: @(#)repdumpdia.tcl /main/titanic/6
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)repdumpdia.tcl /main/titanic/6 28 Nov 1997 Copyright 1997 Cayenne Software Inc.
# Start user added include file section
# End user added include file section
require "repdbdialo.tcl"
Class RepDumpDialog : {RepDbDialog} {
constructor
method destructor
method popUp
method checkOk
method pressedOk
method dumpFinished
attribute nameRow
attribute nameLabel
attribute nameField
attribute shutdownButton
attribute dumpDirectory
attribute dumpedObject
}
constructor RepDumpDialog {class this name view} {
set this [RepDbDialog::constructor $class $this $name $view]
# Start constructor user section
$this autoPopDown 0
interface DlgColumn $this.c {
Label label { text "Name" }
DlgRow r {
spaceType NONE
DlgColumn n {
spaceType EVEN
horStretchFactor 100
SingleLineText name {
text ""
columnCount 30
horStretchFactor 100
}
}
}
CheckButton shut {
label "Shutdown dbservers before dumping."
state 1
}
NamedGroup db {
label "Database"
DlgColumn c { }
}
}
$this nameLabel $this.c.label
$this nameField $this.c.r.n.name
$this nameRow $this.c.r
$this shutdownButton $this.c.shut
$this dumpDirectory ""
$this dumpedObject [ORB::nil]
$this okPressed "$this pressedOk"
[$this nameField] editable 0
[$this nameField] textModified "$this checkOk"
$this createDbInterface $this.c.db.c 30
$this setDbFields
$this setupForPassword
# End constructor user section
return $this
}
method RepDumpDialog::destructor {this} {
# Start destructor user section
# End destructor user section
$this RepDbDialog::destructor
}
method RepDumpDialog::popUp {this} {
$this checkOk
$this RepDbDialog::popUp
}
method RepDumpDialog::checkOk {this} {
$this okSensitive [expr {
[[$this nameField] text] != "" && [$this passwordOk]
}]
}
method RepDumpDialog::pressedOk {this} {
$this busy 1
if ![$this getDbFields dbInfo] {
$this dumpFinished 1
return
}
set rep [[$this view] rep]
if [[$this shutdownButton] state] {
set name [$rep currentName]
if {$name != "" && ![$rep shutdownDbServers $name]} {
$this busy 0
return
}
}
if ![$this dump dbInfo] {
$this busy 0
}
}
method RepDumpDialog::dumpFinished {this exitCode} {
$this busy 0
if {$exitCode == 0} {
$this popDown
[$this view] message "Dumped [$this objDescription] successfully."
} else {
[$this view] message "Failed to dump [$this objDescription]."
}
}
# Do not delete this line -- regeneration end marker