diff options
author | Guido van Rossum <guido@python.org> | 1999-06-25 15:53:54 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1999-06-25 15:53:54 (GMT) |
commit | 7ea8f8404c8291563a77af1fd6acd7920d24b24e (patch) | |
tree | d14655b75743e988247175ae3fa6b024758907a4 /Lib | |
parent | 624a1915121f60350984049a9f942d941ee14fbe (diff) | |
download | cpython-7ea8f8404c8291563a77af1fd6acd7920d24b24e.zip cpython-7ea8f8404c8291563a77af1fd6acd7920d24b24e.tar.gz cpython-7ea8f8404c8291563a77af1fd6acd7920d24b24e.tar.bz2 |
Break some cycles when the widget is destroyed.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/lib-tk/tkSimpleDialog.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/lib-tk/tkSimpleDialog.py b/Lib/lib-tk/tkSimpleDialog.py index 1e7ed46..1830d66 100644 --- a/Lib/lib-tk/tkSimpleDialog.py +++ b/Lib/lib-tk/tkSimpleDialog.py @@ -48,6 +48,10 @@ class Dialog(Toplevel): self.wait_window(self) + def destroy(self): + self.initial_focus = None + Toplevel.destroy(self) + # # construction hooks @@ -131,6 +135,10 @@ class _QueryDialog(Dialog): Dialog.__init__(self, parent, title) + def destroy(self): + self.entry = None + Dialog.destroy(self) + def body(self, master): w = Label(master, text=self.prompt, justify=LEFT) |