[Tkinter-discuss] TclError when destroying parent windows
sj.m at iloinen.net
Sun Jun 29 17:00:31 CEST 2008
Guilherme Polo wrote:
> On Sun, Jun 29, 2008 at 9:22 AM, Jusa <sj.m at iloinen.net> wrote:
> Here, supposing you closed the "Hello" window, self (representing the
> "parent" dialog) would have been destroyed by now.
> Then next:
>> dlg = MyMessageDialog(self, 'Error', 'This dialog causes the
> You try to use "self" as the parent, which is not valid anymore. You
> could change this to self.master, which still exists.
>> root = Tk()
>> hello = MyMessageDialog(root, 'Hello', 'Good day!', 'Open error')
>> params = hello.display()
>> View this message in context:
>> Sent from the Python - tkinter-discuss mailing list archive at
>> Tkinter-discuss mailing list
>> Tkinter-discuss at python.org
> -- Guilherme H. Polo Goncalves
> Tkinter-discuss mailing list
> Tkinter-discuss at python.org
Thanks for the reply. That seems to solve the error up to a point but I
TclError: can't invoke "toplevel" command: application has been destroyed
if I destroy my application main window, which is at the top of the
hierarchy so to speak. Furthermore, if I pass self.master to all of my child
windows, they remain visible when the windows which create them are
destroyed and I'd rather not have it like that. For example, in one scenario
the user is supposed to change the application settings through these child
windows and they remain visible even though the dialog which is supposed to
apply the settings have been destroyed (it's also the dialog which launches
these child dialogs).
Is there a way to completely block the window controls, ie. the close button
at the top corner of a window?
View this message in context: http://www.nabble.com/TclError-when-destroying-parent-windows-tp18178579p18181762.html
Sent from the Python - tkinter-discuss mailing list archive at Nabble.com.
More information about the Tkinter-discuss