SIgnal connect to a object method?



This is probably more of a syntax question than a gtk-perl question, but:

Can I have signal_connect call an object method? Say I've got a class that contains an object method 'bar'; 'foo' is an object of this class, and I've got a combobox 'cbox'. I want to

$cbox->signal_connect (changed => $foo->bar);

but that doesn't work, because it executes $foo->bar right away, instead of when the signal arrives. I've tried playing with the syntax a bit, and no luck.

John



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