[Tkinter-discuss] Problem with 'cascade' and state=disabled (maybe)

Jeff Epler jepler at unpythonic.net
Sun Feb 6 17:50:03 CET 2005

Do you have a full program that demonstrates the problem?

It's *likely* that str(w.entrycget(0, 'menu')) will return the menu's path
as a string, in all cases.

It's also possible that
    import Tkinter
    Tkinter.wantobjects = 0
before creating any interpeter will get you a string instead.

Tcl started as a typeless language:  everything is a string, but some
strings can be interpreted as lists, as numbers, or as commands.  In
later versions, Tcl gained an "object" representation, with a C type
called TclObj* which could hold just a string, an efficient
representation of numbers or lists, a pointer directly to a command,

With 'wantobjects = 1' (the default), a wrapper of a TclObject* can be
returned from Tkinter calls, rather than a string.  In this case, you're
getting the command object that corresponds to the menu widget, rather
than the string naming the menu widget, or the Python object that wraps
that particular menu widget.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.python.org/pipermail/tkinter-discuss/attachments/20050206/2e752ef3/attachment.pgp

More information about the Tkinter-discuss mailing list