Re: Problems getting the child of a Gtk::OptionMenu
- From: Raul Dias <chaos swi com br>
- To: Dermot Musgrove <dermot glade perl connectfree co uk>, Raul Dias <chaos swi com br>
- Cc: <gtk-perl-list gnome org>
- Subject: Re: Problems getting the child of a Gtk::OptionMenu
- Date: Mon, 29 Oct 2001 15:51:13 -0300
Raul Dias wrote:
hi,
I am trying to get the label of a MenuItem in a Gtk::OptionMenu.
[...]
sub callback {
my ($widget) = @_;
print "undefined child!\n" unless defined $widget->child;
}
Hi,
I reckon that this should work - although I haven't tried it :)
my $selected_string = ($widget->get_active->children)[0]->get;
Unfortunally:
"Can't call method "get" on an undefined value"
When adding it to the callback.
Raul Dias
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]