Re: how to connect callback to class method

From: Date: Tue, 24 Dec 2002 08:17:41 +0000
Subject: Re: how to connect callback to class method
References: 1  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-2807@lists.php.net to get a copy of this message
firepage wrote:
Hi, if I have a class class foo{ function foo($moniker){ $butt=&new GtkButton($moniker); $butt->connect('clicked',bar); $butt->connect('clicked',array(&$this,'bar'));
} function bar(){ echo "clicked"; } } then $butt->connect('clicked',bar); can not find the callback clicker nor can $butt->connect('clicked',$this->bar); etc I have tried other combo's of connect_object etc but have not quite got found the right way yet , thought I was getting somewhere with create_function but obviously did not :) a quick example would be much appreciated. & Happy $whatever_you_celebrate ! Regards Simon Wheeler firepages
-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.com

« previous php.gtk.general (#2807) next »