Phillip Mau wrote:
>
> I made up a little program that used TkSteal & Blt.
> I am running Tcl 7.4 and Tk 4.0 on a solaris-sparc.
>
> The problem is, if I startup the program using a script, see below
>
> #! /bin/sh
> exec /usr/bin/wish -f /usr/local/bin/sysadmin.tcl &
> exit
>
> Once it is killed, it doesn't release the process, so if you grep
> for it, it remains.
>
> What is the proper way to startup the tcl script, and have it exit
> cleanly?
>
> Should there be a exit or quit button programmed in, and if so how?
>
> Thanks.
>
> --
> Phillip Mau R&D System Analyst
> Chiron Diagnostics, Medfield, MA
> (508) 359.3696 Fax-(508)359.3955
> [EMAIL PROTECTED]
>
> ------------------------------------------------------------------------
Just in this moment I had the same problem. The solution is to add
a binding for the event <Destroy> to the toplevel widget of your
program. The command should be something like "exit 0" or a global
state variable.
(- press the right mouse button in your toplevel wiget an choose
"Select toplevel"
- choose "Options|Bindings" form the main menu
- in the command window type "exit 0"
- in the event entry type "<Destroy>" (without ")
- press the Add button
)
The reason for this is, that vtcl doesn't use . (the dot) as toplevel
widget but creates a new one an so just this window is destroyed and not
the application.
I hope it helped.
Bernd Blessmann
([EMAIL PROTECTED])
---------------------------------------------------------------------------
To unsubscribe from the Visual Tcl mailing list, please send a message
to [EMAIL PROTECTED] with "unsubscribe vtcl [EMAIL PROTECTED]" in the
message body (where [EMAIL PROTECTED] is your e-mail address).