Re: Fw: [PHP-GTK] ext/libglade complete?
| From: | Andrei Zmievski | Date: | Sun, 30 Oct 2005 20:59:49 +0000 |
| Subject: | Re: Fw: [PHP-GTK] ext/libglade complete? | ||
| References: | 1 2 3 | Groups: | php.gtk.dev |
| Request: | Send a blank email to php-gtk-dev+get-2005@lists.php.net to get a copy of this message | ||
On Oct 30, 2005, at 11:46 AM, Steph Fox wrote:
Sure. Most of the time you won't even need that parameter, and hell, if you just want to add some user data to a callback, maybe the first entry in the array is 'null' instead of callback name, so the callback gets hooked up to the function of the same name. - AndreiWhat's really wrong with it? signal_autoconnect('gladefile_callback' => array('my_callback', $my_data)); This will allow you to re-map a callback in .glade file to a PHP callback. If there are other callbacks specified in the .glade file, then they will be connected automatically to the functions of the same name. I don't see what's so horrible about this.What's really wrong with it is that it encourages name changing. That parameter should only be used if there's a reason for it, i.e. if you want to have array($this, 'gladefile_callback'); in there. The rest of the time, why type extra stuff?