Guilherme Polo wrote:
> 
> On Sun, Jun 29, 2008 at 9:22 AM, Jusa <[EMAIL PROTECTED]> wrote:
>>
>>
>>
> 
> Here, supposing you closed the "Hello" window, self (representing the
> "parent" dialog) would have been destroyed by now.
> Then next:
> 
>>        #ERROR:
>>        dlg = MyMessageDialog(self, 'Error', 'This dialog causes the
>> error.')
>>        dlg.display()
>>        #/ERROR
> 
> 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()
>>
>> root.mainloop()
>>
>> --
>> View this message in context:
>> http://www.nabble.com/TclError-when-destroying-parent-windows-tp18178579p18180082.html
>> Sent from the Python - tkinter-discuss mailing list archive at
>> Nabble.com.
>>
>> _______________________________________________
>> Tkinter-discuss mailing list
>> Tkinter-discuss@python.org
>> http://mail.python.org/mailman/listinfo/tkinter-discuss
>>
> 
> 
> 
> -- 
> -- Guilherme H. Polo Goncalves
> _______________________________________________
> Tkinter-discuss mailing list
> Tkinter-discuss@python.org
> http://mail.python.org/mailman/listinfo/tkinter-discuss
> 
> 


Hi Guilherme, 

Thanks for the reply. That seems to solve the error up to a point but I
still get:

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.

_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss

Reply via email to