]> granicus.if.org Git - python/commitdiff
Fixed PR#106: winfo_visualsavailable() with the includeids=1 option
authorGuido van Rossum <guido@python.org>
Mon, 18 Oct 1999 22:06:38 +0000 (22:06 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 18 Oct 1999 22:06:38 +0000 (22:06 +0000)
didn't properly handle the hex numbers returned.

Lib/lib-tk/Tkinter.py

index 76745910d18c9ff3eef56c849e6bed3d926c15af..c68766960d4e5db4a15b4313fd48ebb51f3a7039 100644 (file)
@@ -423,9 +423,11 @@ class Misc:
                data = self.tk.split(
                        self.tk.call('winfo', 'visualsavailable', self._w,
                                     includeids and 'includeids' or None))
-               def parseitem(x, self=self):
-                       return x[:1] + tuple(map(getint, x[1:]))
-               return map(parseitem, data)
+               return map(self.__winfo_parseitem, data)
+       def __winfo_parseitem(self, t):
+               return t[:1] + tuple(map(self.__winfo_getint, t[1:]))
+       def __winfo_getint(self, x):
+               return _string.atoi(x, 0)
        def winfo_vrootheight(self):
                return getint(
                        self.tk.call('winfo', 'vrootheight', self._w))