Re: timeout_add question
| From: | Rich Payne | Date: | Tue, 19 Feb 2002 13:39:47 +0000 |
| Subject: | Re: timeout_add question | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-1279@lists.php.net to get a copy of this message | ||
On Tue, 19 Feb 2002, Gregory Kaczmarczyk wrote:
> If I have a class (e.g. below), and I would like to add gtk::timeout_add
> to the get_stuff function calling the get_stuff function, how can I do that?
>
> class myClass {
> function set_stuff(...) {
> ...
> }
>
> function get_stuff() {
> ...
> gtk::timeout_add(200, 'get_stuff');
> }
> }
>
> With the example, I get the error: Unable to call handler callback
> 'get_stuff' specified in myfile.php on line 107.
> Would I need to specify the function using "$this" somehow?
Is the timeout being called from instide that function that's starting it?
In either case, yes, you need something like this:
gtk::timeout_add(200,array($this,'get_stuff'));
--rdp
--
Rich Payne
http://talisman.mv.com