Some questions about func_data things.



hi there. 

So i create a thing like this :

$gh = "first";
$button = new Gtk2::Button("something");
$button->signal_connect('clicked' => \&do, $gh);

sub do {
        my ($tmp) = @_;
        print "tmp - $tmp\n";
}

So. I don't know. Is this the right way to "apply" a func_data thing to 
signal_connect ? If this is the right way then my question:

When the script running then i got this:

tmp - HASH(0x34252525)    or something else hash value. How can i catch the 
$gh value that i specified for func_data ??? 

A little example plz. many thx.

Best regards: Christian Hamar alias kRiX





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]