Re: Exception protection to tk calls
Michael Lange <[email protected]> Thu, 1 Apr 2021 11:21:11 +0200
| Newsgroups | gmane.comp.python.tkinter |
|---|---|
| Message-ID | <[email protected]> |
Hi, On Thu, 1 Apr 2021 07:54:40 +0000 Vasilis Vlachoudis <[email protected]> wrote: > Thank you Michael, > > >> grab_release() on a widget that has already been destroyed or, in > >> the/ > > this is also my understanding, however the places that happens are on > Dialog code(s) like > (...) > > My impression is that on slow network connections (using remote X11 > session), sometimes the dialog is displayed before the wait_visibility > is being executed and if the user closes the window from the window > manager, it arrives to the focus_set, grab_set or wait_window with a > window that doesn't exist and then I get the error message. if this is the case, maybe calling self.withdraw() early in the __init__ method and then calling protocol() before deiconify() might help? Just a guess, though. At least it sounds a bit like the users manage to press the "X" button from the window decorations before the protocol() has been applied. Best regards Michael .-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-. Totally illogical, there was no chance. -- Spock, "The Galileo Seven", stardate 2822.3