Re: Fw: [PHP-GTK] ext/libglade complete?
| From: | Andrei Zmievski | Date: | Sun, 30 Oct 2005 19:15:39 +0000 |
| Subject: | Re: Fw: [PHP-GTK] ext/libglade complete? | ||
| References: | 1 | Groups: | php.gtk.dev |
| Request: | Send a blank email to php-gtk-dev+get-1993@lists.php.net to get a copy of this message | ||
On Oct 30, 2005, at 10:59 AM, Steph Fox wrote:
OK, so there's no way to pass arbitrary data from within glade files. Groovy. I've been looking at other languages to see how they've resolved the signal_autoconnect() problem, and they _all_ have different ways. Perl's version has three separate functions for signal_autoconnect(), two of which are 'convenience functions'.... heck, even libglade only has two... We've the choice of implementing signal_autoconnect_full() (which is libglade's own solution to the dilemma) or else doing more or less as you did before. I really don't like this array('gladefile_callback' => array('php_callback', $data)...) set-up - my initial instinct was to kill that 'php_callback', but then Christian won't get his $this. It'd be nice to make that 'php_callback' element an optional array - it shouldn't ever be used unless it _is_ an array, if that were the case.What'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. -Andrei