[Patches] [ python-Patches-1494750 ] BaseWidget.destroy updates master's childern too early

SourceForge.net noreply at sourceforge.net
Thu May 25 08:03:23 CEST 2006


Patches item #1494750, was opened at 2006-05-24 23:03
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1494750&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Tkinter
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: Greg Couch (gregcouch)
Assigned to: Martin v. Löwis (loewis)
Summary: BaseWidget.destroy updates master's childern too early

Initial Comment:
In BaseWidget.destroy(), it removes self from its
master's dict of children before it calls the Tcl
destroy on the widget.  If the widget has a destroy
callback (like Togl, the Tk OpenGL widget), then
nametowidget throws an exception when given the
widget's name even though the Python widget still
exists.  Just reordering the code, so that the Tcl
destroy happens before the updating of the master's
dict of children, fixes the problem.

The bug is present in earlier versions of Tkinter too.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1494750&group_id=5470


More information about the Patches mailing list