[Python-checkins] python/dist/src/Lib/lib-tk Tkinter.py, 1.181,
1.181.2.1
loewis at users.sourceforge.net
loewis at users.sourceforge.net
Tue Mar 1 09:10:52 CET 2005
Update of /cvsroot/python/python/dist/src/Lib/lib-tk
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv881/Lib/lib-tk
Modified Files:
Tag: release24-maint
Tkinter.py
Log Message:
Patch #1121234: Properly cleanup _exit and tkerror commands.
Index: Tkinter.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/lib-tk/Tkinter.py,v
retrieving revision 1.181
retrieving revision 1.181.2.1
diff -u -d -r1.181 -r1.181.2.1
--- Tkinter.py 3 Aug 2004 18:36:25 -0000 1.181
+++ Tkinter.py 1 Mar 2005 08:10:49 -0000 1.181.2.1
@@ -1599,8 +1599,15 @@
raise RuntimeError, \
"Tk 4.0 or higher is required; found Tk %s" \
% str(TkVersion)
+ # Create and register the tkerror and exit commands
+ # We need to inline parts of _register here, _ register
+ # would register differently-named commands.
+ if self._tclCommands is None:
+ self._tclCommands = []
self.tk.createcommand('tkerror', _tkerror)
self.tk.createcommand('exit', _exit)
+ self._tclCommands.append('tkerror')
+ self._tclCommands.append('exit')
if _support_default_root and not _default_root:
_default_root = self
self.protocol("WM_DELETE_WINDOW", self.destroy)
More information about the Python-checkins
mailing list