[ale] Gtk-Perl

Eric Anderson eric.anderson at cordata.net
Thu Nov 7 17:23:09 EST 2002


On Thu, 2002-11-07 at 15:42, Eric Anderson wrote:
> So I have a reference to the GtkOptionMenu. So it should be as easy as
> something like this
> 
> $dropdown->get_menu()->get_active()->child()->get();
> 
... snip ...
> will get me a GtkMenuItem, but I can't get the value from there because
> child() return undef.

Eric's First Law of Development: Whenever you ask a question you will
soon figure it out making yourself look dumb for asking.

Evidently the GtkMenuItem get re-parented to GtkOptionGroup when it is
selected. Hence the child() of the selected GtkMenuItem is undef. To get
the value simply:

$dropdown->child()->get();

-- 
Eric Anderson

---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list