How to destroy a parent window while a child is being created?
- From: npatino@xxxxxxxxxxxxxx
- Date: 30 Jun 2005 13:25:18 -0700
Hello,
Running Tcl-Tk application on slower computers, I have encountered what
I believe must be a general situation already addressed in most Tcl-Tk
applications, but I'm not sure what is the best way to do it.
>>From a menu in a window, say .topl_1, a process is launched (which e.g.
scans a database), and shows its results in another window, say
..topl_1.topl_2 (since both windows are related, I want the second one
to be closed when the first one is).
Now, the scanning process takes some time to execute, and while it is
running, the user closes .topl_1. All commands involved in the creation
of the second window that refer to the first one will then fail,
because the parent window no longer exists.
Is there a typical or recommended manner of addressing this problem in
a general way (i.e. without an ad-hoc coding -like catch'ing all
references to the parent window-, e.g. modifying the properties of the
first window)? Will e.g. an "after idle destroy" help in this case?
Any help will be greatly appreciated. Thanks in advance.
Best regards,
Nestor Patino
npatino@xxxxxxxxxxxxxx
.
- Prev by Date: Re: Having problem with SPLIT
- Next by Date: Re: Having problem with SPLIT
- Previous by thread: TCL socket connection
- Index(es):
Relevant Pages
|