[issue11387] Tkinter, callback functions
Guilherme Polo
report at bugs.python.org
Sun Mar 6 16:21:33 CET 2011
Guilherme Polo <ggpolo at gmail.com> added the comment:
I have a different problem here on Mac, but I can manage to reproduce
your issue if I apply the following patch:
Index: Lib/tkinter/__init__.py
===================================================================
--- Lib/tkinter/__init__.py (revision 88757)
+++ Lib/tkinter/__init__.py (working copy)
@@ -920,9 +920,9 @@
self.tk.call('bindtags', self._w, tagList)
def _bind(self, what, sequence, func, add, needcleanup=1):
"""Internal function."""
- if isinstance(func, str):
- self.tk.call(what + (sequence, func))
- elif func:
+ #if isinstance(func, str):
+ # self.tk.call(what + (sequence, func))
+ if func:
funcid = self._register(func, self._substitute,
needcleanup)
cmd = ('%sif {"[%s %s]" == "break"} break\n'
This should help someone else to produce a patch for this problem you
reported. It is "interesting" that this same patch fixes the problem I
have here (I get a SIGSEGV if I click the cancel button side the
askdirectory dialog).
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11387>
_______________________________________
More information about the Python-bugs-list
mailing list