diff options
author | Guido van Rossum <guido@python.org> | 1996-09-11 14:23:43 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1996-09-11 14:23:43 (GMT) |
commit | 6b7a7e9fe0f0ff1157a41000595938c407af7ddb (patch) | |
tree | 5e3e73811d61b4add9a49474d4d94062bee0db5b | |
parent | ee09fc1c3052a0dc2c6557431cb31e1197917ce1 (diff) | |
download | cpython-6b7a7e9fe0f0ff1157a41000595938c407af7ddb.zip cpython-6b7a7e9fe0f0ff1157a41000595938c407af7ddb.tar.gz cpython-6b7a7e9fe0f0ff1157a41000595938c407af7ddb.tar.bz2 |
Bug fixes in index&icursor suggested by Nils Fischbeck.
-rw-r--r-- | Lib/lib-tk/Canvas.py | 10 | ||||
-rwxr-xr-x | Lib/tkinter/Canvas.py | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/Lib/lib-tk/Canvas.py b/Lib/lib-tk/Canvas.py index 801fd8b..51692e1 100644 --- a/Lib/lib-tk/Canvas.py +++ b/Lib/lib-tk/Canvas.py @@ -56,10 +56,10 @@ class CanvasItem: self.canvas.focus(self.id) def gettags(self): return self.canvas.gettags(self.id) - def icursor(self): - self.canvas.icursor(self.id) - def index(self): - return self.canvas.index(self.id) + def icursor(self, index): + self.canvas.icursor(self.id, index) + def index(self, index): + return self.canvas.index(self.id, index) def insert(self, beforethis, string): self.canvas.insert(self.id, beforethis, string) def lower(self, belowthis=None): @@ -154,7 +154,7 @@ class Group: def gettags(self): return self.canvas.tk.splitlist(self._do('gettags', self.tag)) def icursor(self, index): - return self._do('icursor') + return self._do('icursor', index) def index(self, index): return self.canvas.tk.getint(self._do('index', index)) def insert(self, beforeThis, string): diff --git a/Lib/tkinter/Canvas.py b/Lib/tkinter/Canvas.py index 801fd8b..51692e1 100755 --- a/Lib/tkinter/Canvas.py +++ b/Lib/tkinter/Canvas.py @@ -56,10 +56,10 @@ class CanvasItem: self.canvas.focus(self.id) def gettags(self): return self.canvas.gettags(self.id) - def icursor(self): - self.canvas.icursor(self.id) - def index(self): - return self.canvas.index(self.id) + def icursor(self, index): + self.canvas.icursor(self.id, index) + def index(self, index): + return self.canvas.index(self.id, index) def insert(self, beforethis, string): self.canvas.insert(self.id, beforethis, string) def lower(self, belowthis=None): @@ -154,7 +154,7 @@ class Group: def gettags(self): return self.canvas.tk.splitlist(self._do('gettags', self.tag)) def icursor(self, index): - return self._do('icursor') + return self._do('icursor', index) def index(self, index): return self.canvas.tk.getint(self._do('index', index)) def insert(self, beforeThis, string): |