]> granicus.if.org Git - python/commitdiff
Issue #1119673: Do not override Tkinter.Text methods when creating a ScrolledText.
authorGuilherme Polo <ggpolo@gmail.com>
Tue, 18 Aug 2009 13:23:08 +0000 (13:23 +0000)
committerGuilherme Polo <ggpolo@gmail.com>
Tue, 18 Aug 2009 13:23:08 +0000 (13:23 +0000)
Lib/lib-tk/ScrolledText.py
Misc/NEWS

index 8076bc4f9e23121f2738940776268d2b17c06bb2..a1ef79ca74c74f8c1211ab52ed8a45666d7ad654 100644 (file)
@@ -27,8 +27,11 @@ class ScrolledText(Text):
         self.pack(side=LEFT, fill=BOTH, expand=True)
         self.vbar['command'] = self.yview
 
-        # Copy geometry methods of self.frame -- hack!
+        # Copy geometry methods of self.frame without overriding Text
+        # methods -- hack!
+        text_meths = vars(Text).keys()
         methods = vars(Pack).keys() + vars(Grid).keys() + vars(Place).keys()
+        methods = set(methods).difference(text_meths)
 
         for m in methods:
             if m[0] != '_' and m != 'config' and m != 'configure':
index 4b28be2bb6aef49fb755c144d7afabde4920c80a..ca3c5e853b379a92276b8ff818a05686b27e5bda 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -359,6 +359,9 @@ Core and Builtins
 Library
 -------
 
+- Issue #1119673: Do not override Tkinter.Text methods when creating a
+  ScrolledText.
+
 - Issue #6665: Fix fnmatch to properly match filenames with newlines in them.
 
 - Issue #1135: Add the XView and YView mix-ins to avoid duplicating