Re: Connection methods
| From: | Andrei Zmievski | Date: | Sun, 16 Oct 2005 19:46:15 +0000 |
| Subject: | Re: Connection methods | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.gtk.dev |
| Request: | Send a blank email to php-gtk-dev+get-1840@lists.php.net to get a copy of this message | ||
On Oct 16, 2005, at 5:58 AM, Steph wrote:
The one just about everyone uses is $window->connect_object('destroy', array('gtk', 'main_quit'));This is precisely what connect_simple() is for: it'll just invoke gtk::main_quit() without passing it anything.
You'd also use it anywhere you didn't want to pass the initial object but wanted to use one of its signals, and that does arise a fair deal. Sometimes you'll need the signal's parameters to be passed too, sometimes you won't. In event signals it's fairly common to want to do something with $event as well as with your user data (ie other widgets etc), but at present we don't have a way of passing $event without passing the initial object.But how will connect_replace() help you here? You will still need to pass an object, albeit not the one that emitted the signal, so the function signature will stay the same. -Andrei