]> granicus.if.org Git - python/commitdiff
Turns out that 'winfo id' returns the id as a hex string, with 0x prefix.
authorGuido van Rossum <guido@python.org>
Fri, 19 Jun 1998 04:35:45 +0000 (04:35 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 19 Jun 1998 04:35:45 +0000 (04:35 +0000)
The int() function (aliased to getint()) doesn't handle that, so we must
use self.tk.getint() again...

Lib/lib-tk/Tkinter.py

index a508d26d12c6b69c145ded6c1ac2ed20ebafe743..d7e73cfb4b75a62147a7db06fc592aa999cbc55c 100644 (file)
@@ -332,7 +332,7 @@ class Misc:
                return getint(
                        self.tk.call('winfo', 'height', self._w))
        def winfo_id(self):
-               return getint(
+               return self.tk.getint(
                        self.tk.call('winfo', 'id', self._w))
        def winfo_interps(self, displayof=0):
                args = ('winfo', 'interps') + self._displayof(displayof)