home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1997 November
/
PCWorld_1997-11_cd.bin
/
software
/
programy
/
komix
/
DATA.Z
/
dbasepwddi.tcl
< prev
next >
Wrap
Text File
|
1996-09-27
|
2KB
|
92 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1996
#
# File: @(#)dbasepwddi.tcl /main/hindenburg/2
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)dbasepwddi.tcl /main/hindenburg/2 27 Sep 1996 Copyright 1996 Cayenne Software Inc.
# Start user added include file section
require wmt_util.tcl
# End user added include file section
Class DbasePwdDialog : {LoginDialog} {
constructor
method destructor
method okHandler
method popUp
attribute executeScript
attribute tdbHost
attribute tdbName
}
constructor DbasePwdDialog {class this name} {
set this [LoginDialog::constructor $class $this $name]
# Start constructor user section
$this config \
-title "Password" \
-okPressed "$this okHandler" \
-helpPressed "[getParent $this] helpOnName [nt_get_type $this]"
# End constructor user section
return $this
}
method DbasePwdDialog::destructor {this} {
# Start destructor user section
# End destructor user section
}
method DbasePwdDialog::okHandler {this} {
set curConfig [[ClientContext::global] currentConfig]
global target
if {$target == "SYBASE" || $target == "SQLSERVER"} {
set context [$this tdbHost]
} else {
set context [$this tdbName]
}
#save the password in the M4var
m4_var set M4_password [$this entry] -context $context
eval [$this executeScript]
}
method DbasePwdDialog::popUp {this {script ""} {tdbHost ""} {tdbName ""}} {
set curConfig [[ClientContext::global] currentConfig]
if {$tdbHost == ""} {
$this tdbHost [$curConfig getPropertyValue tdbhost]
} else {
$this tdbHost $tdbHost
}
if {$tdbName == ""} {
$this tdbName [$curConfig getPropertyValue tdbname]
} else {
$this tdbName $tdbName
}
global target
case "$target" in {
{SYBASE SQLSERVER} {
set server [$this tdbHost]
$this message "Server: $server"
}
{ORACLE} {
set schema [$this tdbName]
$this message "Schema: $schema"
}
{default} {
set database [$this tdbName]
$this message "Database: $database"
}
}
$this executeScript "$script"
$this EntryDialog::popUp
}
# Do not delete this line -- regeneration end marker