in reply to GTK2+glade and knowing who called
I haven't used Glade but can't you set the "user data" argument in Glade? That's the usual way of passing the useful data to callbacks. There also should be the $self argument which (IIRC) contains the widget that initiated the signal. Perhaps not very useful by itself.
# passing an anonymous array as user data $button->signal_connect(clicked => \&btn_search, [$searchbox, $res_vbo +x]); sub btn_search { my ($self, $args) = @_; # unpacking user data my ($entry, $box) = @$args; # ...
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: GTK2+glade and knowing who called
by ultibuzz (Monk) on Jan 22, 2013 at 13:39 UTC |
In Section
Seekers of Perl Wisdom