Re: Fw: [PHP-GTK] ext/libglade complete?

From: Date: Sun, 30 Oct 2005 19:46:19 +0000
Subject: Re: Fw: [PHP-GTK] ext/libglade complete?
References: 1 2  Groups: php.gtk.dev 
Request: Send a blank email to php-gtk-dev+get-1997@lists.php.net to get a copy of this message
> > 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. 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?

« previous php.gtk.dev (#1997) next »