[Tkinter-discuss] What's the point of Toplevel.wait_window?
geoff.bache at gmail.com
Tue May 11 09:07:50 CEST 2010
> According to <http://wiki.tcl.tk/10014> it waits for the window to be
> destroyed. Why do you ask?
I realise that, but if I just don't call it and return control to the
mainloop then much the same thing will happen anyway (i.e. the
application will wait for events in the window concerned and respond
to them appropriately)
All the examples I can find for it are in the context of a modal
dialog but "grab_set" causes dialogs to be modal with or without
I'm trying to understand some code I've inherited and getting some
funny race conditions which I can't really pin down, related to calls
to after_idle. They seem to go away if I remove the call to
wait_window so I'd like to get my head round what the point of calling
it is. The code looks much like the sample code (tkSimpleDialog.py) at
http://effbot.org/tkinterbook/tkinter-dialog-windows.htm and in fact
may even have been copied from there.
More information about the Tkinter-discuss