home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
info.tcl
< prev
next >
Wrap
Text File
|
1997-11-03
|
1KB
|
39 lines
# Redefine startCommandWithOptions, so a window title can be specified.
# Default title is 'Options..'
# Can be used by existing procs, but, is used by creproj.tcl (create project).
method WmtTool::startCommandWithOptions {this type cmd endCmd msg upd busy {dir ""} {title "Options.."}} {
# Ask options first before starting command
set box $this.startCommandWithOptions
ClassMaker::extend EntryDialog OptionsEntryDialog \
{type cmdBefore cmdAfter endCmd msg upd busy dir}
# find the $OPTIONS string to determine the place of the options
set index [string first \$OPTIONS "$cmd"]
set cmdBefore "$cmd"
set cmdAfter ""
if {$index != -1} {
set cmdBefore [string range "$cmd" 0 [expr {$index -1}]]
set index [expr { $index + 9}]
set cmdAfter [string range "$cmd" $index end]
}
OptionsEntryDialog new $box \
-modal yes \
-title $title \
-type $type \
-cmdBefore $cmdBefore \
-cmdAfter $cmdAfter \
-endCmd $endCmd \
-msg $msg \
-upd $upd \
-busy $busy \
-dir $dir \
-cancelPressed {%this delete} \
-okPressed {
$wmttoolObj startCommand "[%this type]" \
"[%this cmdBefore] [%this entry] [%this cmdAfter]" "[%this endCmd]"\
"[%this msg]" "[%this upd]" "[%this busy]" "[%this dir]"
%this delete
}
$box delHelpButton
$box popUp
}