From: Martin v. Löwis Date: Sat, 18 Nov 2006 18:42:11 +0000 (+0000) Subject: Patch #1472877: Fix Tix subwidget name resolution. X-Git-Tag: v2.6a1~2424 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bba003ef248786399aeb1aed4b0c2007b28bce56;p=python Patch #1472877: Fix Tix subwidget name resolution. Will backport to 2.5. --- diff --git a/Lib/lib-tk/Tix.py b/Lib/lib-tk/Tix.py index 33ac5190de..b7a0fc0776 100755 --- a/Lib/lib-tk/Tix.py +++ b/Lib/lib-tk/Tix.py @@ -421,7 +421,7 @@ class TixSubWidget(TixWidget): except: plist = [] - if (not check_intermediate) or len(plist) < 2: + if not check_intermediate: # immediate descendant TixWidget.__init__(self, master, None, None, {'name' : name}) else: @@ -437,6 +437,9 @@ class TixSubWidget(TixWidget): parent = TixSubWidget(parent, plist[i], destroy_physically=0, check_intermediate=0) + # The Tk widget name is in plist, not in name + if plist: + name = plist[-1] TixWidget.__init__(self, parent, None, None, {'name' : name}) self.destroy_physically = destroy_physically diff --git a/Misc/NEWS b/Misc/NEWS index b1cf907228..4f1df73fac 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -98,6 +98,8 @@ Core and builtins Library ------- +- Patch #1472877: Fix Tix subwidget name resolution. + - Patch #1594554: Always close a tkSimpleDialog on ok(), even if an exception occurs.