]> granicus.if.org Git - python/commitdiff
Tim Peters writes:
authorGuido van Rossum <guido@python.org>
Mon, 3 May 1999 15:38:56 +0000 (15:38 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 3 May 1999 15:38:56 +0000 (15:38 +0000)
[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" <wink>.

Tools/idle/WidgetRedirector.py

index 45f86f7e387b5694b28b1f5d010a3c2b724f1a36..b11b0e40472f7ea4f523c072b33870f1b038dc76 100644 (file)
@@ -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