This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: BaseWidget.destroy updates master's childern too early
Type: Stage:
Components: Tkinter Versions: Python 2.4
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: loewis Nosy List: gregcouch, loewis
Priority: normal Keywords: patch

Created on 2006-05-25 06:03 by gregcouch, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
Tkinter.patch gregcouch, 2006-05-25 06:03 simple patch of Tkinter.py
Messages (2)
msg50360 - (view) Author: Greg Couch (gregcouch) Date: 2006-05-25 06:03
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.
msg50361 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-06-17 09:25
Logged In: YES 
user_id=21627

Thanks for the patch. Committed as r47000.
History
Date User Action Args
2022-04-11 14:56:17adminsetgithub: 43409
2006-05-25 06:03:23gregcouchcreate