Commit bd814620 authored by Neal Norwitz's avatar Neal Norwitz

Fix SF bug #763637, 2.3b2 unpack tuple of wrong size in after_cancel

Tk 8.4 may return different values than 8.3.  This fix should handle
either version.
parent 2a32ae68
...@@ -475,8 +475,10 @@ class Misc: ...@@ -475,8 +475,10 @@ class Misc:
Identifier returned by after or after_idle must be Identifier returned by after or after_idle must be
given as first parameter.""" given as first parameter."""
try: try:
(script, type) = self.tk.splitlist( data = self.tk.call('after', 'info', id)
self.tk.call('after', 'info', id)) # In Tk 8.3, splitlist returns: (script, type)
# In Tk 8.4, splitlist may return (script, type) or (script,)
script = self.tk.splitlist(data)[0]
self.deletecommand(script) self.deletecommand(script)
except TclError: except TclError:
pass pass
......
...@@ -30,6 +30,9 @@ Library ...@@ -30,6 +30,9 @@ Library
- SF bug 763023: fix uncaught ZeroDivisionError in difflib ratio methods - SF bug 763023: fix uncaught ZeroDivisionError in difflib ratio methods
when there are no lines. when there are no lines.
- SF bug 763637: fix exception in Tkinter with after_cancel
which could occur with Tk 8.4
Tools/Demos Tools/Demos
----------- -----------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment