summaryrefslogtreecommitdiff
path: root/Lib/lib-tk
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2003-06-07 19:52:38 +0000
committerMartin v. Löwis <martin@v.loewis.de>2003-06-07 19:52:38 +0000
commit0f9e525bdffd3ac25256462a14806956434caeb6 (patch)
tree9d775a61d6faff9869ab34880ac0aa3944913ac9 /Lib/lib-tk
parent7890c26508c3ddf8548b97cf5b1e85814f83cfb0 (diff)
downloadcpython-git-0f9e525bdffd3ac25256462a14806956434caeb6.tar.gz
Patch #749191: Delete commands in after_cancel. Will backport to 2.2.
Diffstat (limited to 'Lib/lib-tk')
-rw-r--r--Lib/lib-tk/Tkinter.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py
index 2025ba84b8..11dae120d4 100644
--- a/Lib/lib-tk/Tkinter.py
+++ b/Lib/lib-tk/Tkinter.py
@@ -474,6 +474,12 @@ class Misc:
Identifier returned by after or after_idle must be
given as first parameter."""
+ try:
+ (script, type) = self.tk.splitlist(
+ self.tk.call('after', 'info', id))
+ self.deletecommand(script)
+ except TclError:
+ pass
self.tk.call('after', 'cancel', id)
def bell(self, displayof=0):
"""Ring a display's bell."""