How to destroy a parent window while a child is being created?



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

.



Relevant Pages

  • Re: How to destroy a parent window while a child is being created?
    ... n> Running Tcl-Tk application on slower computers, ... n> I believe must be a general situation already addressed in most Tcl-Tk ... n> of the second window that refer to the first one will then fail, ... n> Is there a typical or recommended manner of addressing this problem in ...
    (comp.lang.tcl)
  • Re: OT: Music trivia..
    ... Button Window" could be taken as pro-abortion, ... addressing the option. ... Matt "Guitar" Murphy. ...
    (rec.boats)
  • Re: Access automation error
    ... It's not clear from what you show if you're actually addressing that ... > on it the focus of the window comes back to access. ... > I have checked the code with break points and nothing runs after this sub is ... Cindy Meister ...
    (microsoft.public.word.docmanagement)