Seg, 2004-10-18 �s 15:44 -0300, Christian Robottom Reis escreveu: > On Mon, Oct 18, 2004 at 07:15:32PM +0100, Gustavo J. A. M. Carneiro wrote: > > It's just that you have to get the selected menu item first, only then > > get_data. It forces you to understand the internal structure of the > > option menu to get to the selected menu item. > > Well, isn't it just a matter of doing: > > optionmenu.get_menu().get_active()
So you prefer:
optionmenu.get_menu().get_active().get_data("foobar")
I prefer:
foobar[optionmenu.get_history()]
Mine is shorter! :)
And a shared data structure is good. You can even use that to build
the option menu. And you'll have anyways most of the times if you value
gui / main code separation in your program.
Best regards.
>
> -- ?
>
> I tend to find using that a lot more straightforward than using
> get_history() to get the index and then depend on a shared data
> structure (which may or may not be available where you need it).
>
> Take care,
> --
> Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 3361 2331
> _______________________________________________
> pygtk mailing list [EMAIL PROTECTED]
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
--
Gustavo J. A. M. Carneiro
<[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
The universe is always one step beyond logic.
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
