Re: Setting an objects method as callback function ?

From: Date: Sun, 08 Apr 2001 15:38:14 +0000
Subject: Re: Setting an objects method as callback function ?
References: 1  Groups: php.gtk 
Request: Send a blank email to php-gtk+get-1318@lists.php.net to get a copy of this message
At 02:58 PM 4/8/01 +0200, Markus Fischer wrote:
Ok, I've banging my head not so often lately against my screen than against my desk. Anyway I can't solve this stupid problem and am horibly stuck : Within an class I create my gui stuff : class gtkError extends phpError {
        var $shutdownFunc;
        function gtkError() {
                phpError::phpError();
                $this->shutdownFunc = 'Gtk::main_quit();';
First of all, this should be array('Gtk', 'main_quit'). That's how you specify class/object method callbacks.
The Problem is the line
        ·$this->gtkError->registerShutdown( &$this->shutdown);
Get rid of & in the call and try again. -Andrei

« previous php.gtk (#1318) next »