Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: GTK2+glade and knowing who called

by Anonymous Monk
on Jan 22, 2013 at 13:30 UTC ( #1014655=note: print w/ replies, xml ) Need Help??


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; # ...


Comment on Re: GTK2+glade and knowing who called
Select or Download Code
Re^2: GTK2+glade and knowing who called
by ultibuzz (Monk) on Jan 22, 2013 at 13:39 UTC

    that would be the object next to the handler in the xml,
    the docs on glade state that you can not get that user data unless you create custom signals for everything.
    For my purpose the Object who called is enough to work with,
    at least for now ;), maybe i'll do the whole thing in c++ or go back to TK

    kind regards
    Alex

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1014655]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2014-08-30 06:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (291 votes), past polls