home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
dbasepwddi.tcl
< prev
next >
Wrap
Text File
|
1997-11-12
|
2KB
|
96 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: @(#)dbasepwddi.tcl /main/titanic/4
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)dbasepwddi.tcl /main/titanic/4 12 Nov 1997 Copyright 1997 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
attribute target
}
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]"
if [catch {uplevel source [list [m4_path_name tcl tgtname.tcl]]}] {
resetErrorVars
}
# 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]
set target [$this 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
}
set target [$this 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