[Tutor] Fun with Label and Entry--Why NoneType?

Alan Gauld alan.gauld at btinternet.com
Tue Mar 17 22:32:53 CET 2009


"Wayne Watson" <sierra_mtnview at sbcglobal.net> wrote

>  got shelled by:

>    dialog = DialogPrototype(root)
> TclError: window ".60529560" was deleted before its visibility 
> changed

Thats the result of withdraw I think

Try reversing the calls:

root = Tk()
dialog = DialogPrototype(root)
root.withdraw()

That way the withdraw happens after the dialog is created.
root should not then be garbage collected since it is still
referred to by the Dialog parent attribute.

I think... :-)

Alan G. 




More information about the Tutor mailing list