From: Guido van Rossum Date: Mon, 3 May 1999 15:38:56 +0000 (+0000) Subject: Tim Peters writes: X-Git-Tag: v1.6a1~1394 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2d6a568a0f6c65c76797556bf949b97ede9049e1;p=thirdparty%2FPython%2Fcpython.git Tim Peters writes: [W]hile trying to dope out how redirection works, stumbled into two possible glitches. In the first, it doesn't appear to make sense to try to rename a command that's already been destroyed; in the second, the name "previous" doesn't really bring to mind "ignore the previous value" . --- diff --git a/Tools/idle/WidgetRedirector.py b/Tools/idle/WidgetRedirector.py index 45f86f7e387b..b11b0e40472f 100644 --- a/Tools/idle/WidgetRedirector.py +++ b/Tools/idle/WidgetRedirector.py @@ -28,11 +28,11 @@ class WidgetRedirector: tk = widget.tk w = widget._w tk.deletecommand(w) - tk.call("rename", w, orig) + tk.call("rename", orig, w) def register(self, name, function): if self.dict.has_key(name): - previous = function + previous = dict[name] else: previous = OriginalCommand(self, name) self.dict[name] = function