]> granicus.if.org Git - python/commitdiff
fix canvas bind commands
authorGuido van Rossum <guido@python.org>
Sun, 21 Jul 1996 02:19:32 +0000 (02:19 +0000)
committerGuido van Rossum <guido@python.org>
Sun, 21 Jul 1996 02:19:32 +0000 (02:19 +0000)
Lib/lib-tk/Canvas.py
Lib/lib-tk/Tkinter.py
Lib/tkinter/Canvas.py
Lib/tkinter/Tkinter.py

index 1e4a5c86940d50174fcecf2a8b775423cc81ecea..cba22d1a095d64473a39469e13ab4018d60d73ae 100644 (file)
@@ -52,7 +52,7 @@ class CanvasItem:
                x1, y1, x2, y2 = self.canvas.bbox(self.id)
                return (x1, y1), (x2, y2)
        def bind(self, sequence=None, command=None):
-               return self.canvas.bind(self.id, sequence, command)
+               return self.canvas.tag_bind(self.id, sequence, command)
        def config(self, cnf=None):
                return self.canvas.itemconfig(self.id, cnf)
        def coords(self, pts = ()):
index d033823f88aa7e0021a7801053bb8c3e6423b458..4c7fd71927e5444e95611a05f91f784159c916bc 100644 (file)
@@ -951,7 +951,7 @@ class Canvas(Widget):
        def tag_unbind(self, tagOrId, sequence):
                self.tk.call(self._w, 'bind', tagOrId, sequence, '')
        def tag_bind(self, tagOrId, sequence=None, func=None, add=None):
-               return self._bind((self._w, 'tag', 'bind', tagOrId),
+               return self._bind((self._w, 'bind', tagOrId),
                                  sequence, func, add)
        def canvasx(self, screenx, gridspacing=None):
                return self.tk.getdouble(self.tk.call(
index 1e4a5c86940d50174fcecf2a8b775423cc81ecea..cba22d1a095d64473a39469e13ab4018d60d73ae 100755 (executable)
@@ -52,7 +52,7 @@ class CanvasItem:
                x1, y1, x2, y2 = self.canvas.bbox(self.id)
                return (x1, y1), (x2, y2)
        def bind(self, sequence=None, command=None):
-               return self.canvas.bind(self.id, sequence, command)
+               return self.canvas.tag_bind(self.id, sequence, command)
        def config(self, cnf=None):
                return self.canvas.itemconfig(self.id, cnf)
        def coords(self, pts = ()):
index d033823f88aa7e0021a7801053bb8c3e6423b458..4c7fd71927e5444e95611a05f91f784159c916bc 100755 (executable)
@@ -951,7 +951,7 @@ class Canvas(Widget):
        def tag_unbind(self, tagOrId, sequence):
                self.tk.call(self._w, 'bind', tagOrId, sequence, '')
        def tag_bind(self, tagOrId, sequence=None, func=None, add=None):
-               return self._bind((self._w, 'tag', 'bind', tagOrId),
+               return self._bind((self._w, 'bind', tagOrId),
                                  sequence, func, add)
        def canvasx(self, screenx, gridspacing=None):
                return self.tk.getdouble(self.tk.call(