[ python-Bugs-934418 ] nametowidget throws TypeError for Tcl_Objs

SourceForge.net noreply at sourceforge.net
Thu Apr 15 16:52:47 EDT 2004


Bugs item #934418, was opened at 2004-04-13 20:38
Message generated for change (Settings changed) made by loewis
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=934418&group_id=5470

>Category: Tkinter
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Greg Couch (gregcouch)
Assigned to: Nobody/Anonymous (nobody)
Summary: nametowidget throws TypeError for Tcl_Objs

Initial Comment:
In some rare cases with Python 2.3.3 and Tcl/Tck 8.4.5,
in particular in tk_focusNext(), self.tk.call returns a
Tcl_Obj instead of a string and then nametowidget()
throws a TypeError when it tries to check if the first
character is a period or not.  Since Tcl/Tk is only
going to get more Tcl_Obj-ectified, the best solution
is to not change tk_focusNext(), but to add two lines
to nametowidget():

   if not isinstance(name, str):
        name = str(name)

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=934418&group_id=5470



More information about the Python-bugs-list mailing list