[Python-checkins] python/dist/src/Lib/lib-tk Tkinter.py,1.160.10.1,1.160.10.2

mwh@users.sourceforge.net mwh@users.sourceforge.net
2002年8月23日 08:27:54 -0700


Update of /cvsroot/python/python/dist/src/Lib/lib-tk
In directory usw-pr-cvs1:/tmp/cvs-serv31843
Modified Files:
 Tag: release22-maint
	Tkinter.py 
Log Message:
backport loewis' checkin of
 revision 1.161 of Tkinter.py
Ignore widgets with unknown names in winfo_children. Fixes #518283.
2.2.2 candidate.
Index: Tkinter.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/lib-tk/Tkinter.py,v
retrieving revision 1.160.10.1
retrieving revision 1.160.10.2
diff -C2 -d -r1.160.10.1 -r1.160.10.2
*** Tkinter.py	23 Jul 2002 02:55:14 -0000	1.160.10.1
--- Tkinter.py	23 Aug 2002 15:27:52 -0000	1.160.10.2
***************
*** 606,612 ****
 def winfo_children(self):
 """Return a list of all widgets which are children of this widget."""
! return map(self._nametowidget,
! self.tk.splitlist(self.tk.call(
! 'winfo', 'children', self._w)))
 def winfo_class(self):
 """Return window class name of this widget."""
--- 606,620 ----
 def winfo_children(self):
 """Return a list of all widgets which are children of this widget."""
! result = []
! for child in self.tk.splitlist(
! self.tk.call('winfo', 'children', self._w)):
! try:
! # Tcl sometimes returns extra windows, e.g. for
! # menus; those need to be skipped
! result.append(self._nametowidget(child))
! except KeyError:
! pass
! return result
! 
 def winfo_class(self):
 """Return window class name of this widget."""

AltStyle によって変換されたページ (->オリジナル) /