]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #25464: Fixed HList.header_exists() in tkinter.tix module by addin
authorSerhiy Storchaka <storchaka@gmail.com>
Mon, 24 Oct 2016 20:47:28 +0000 (23:47 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Mon, 24 Oct 2016 20:47:28 +0000 (23:47 +0300)
a workaround to Tix library bug.

Lib/tkinter/tix.py
Misc/NEWS

index 7fb4bc54177878e9ae38c8bd2e0e47bb6f0da31f..2ed6a77f6f98403ca7d66e31d026a8bcf185c1b1 100644 (file)
@@ -929,7 +929,11 @@ class HList(TixWidget, XView, YView):
         return self.tk.call(self._w, 'header', 'cget', col, opt)
 
     def header_exists(self,  col):
-        return self.tk.call(self._w, 'header', 'exists', col)
+        # A workaround to Tix library bug (issue #25464).
+        # The documented command is "exists", but only erroneous "exist" is
+        # accepted.
+        return self.tk.getboolean(self.tk.call(self._w, 'header', 'exist', col))
+    header_exist = header_exists
 
     def header_delete(self, col):
         self.tk.call(self._w, 'header', 'delete', col)
index 33dcb7613ce60f23f0938f6ca1359b5891e1016b..8b99882436be59119db7e6fc95c949140c2a8802 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -110,6 +110,9 @@ Core and Builtins
 Library
 -------
 
+- Issue #25464: Fixed HList.header_exists() in tkinter.tix module by addin
+  a workaround to Tix library bug.
+
 - Issue #28488: shutil.make_archive() no longer add entry "./" to ZIP archive.
 
 - Issue #24452: Make webbrowser support Chrome on Mac OS X.