Re: Problems with Gtk::timeout_add()
| From: | ecc | Date: | Wed, 15 Nov 2006 14:40:16 +0000 |
| Subject: | Re: Problems with Gtk::timeout_add() | ||
| References: | 1 2 3 4 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-7473@lists.php.net to get a copy of this message | ||
Thank you for the answers.... i think, now its clear for me.
Regards,
andreas
Scott Mattocks-2 wrote:
>
> ecc wrote:
>> Ok, i will remove the "return true", but why? :-) Why will this work, if
>> i
>> dont return anything?
>
> If a callback to timeout_add() returns true, it signals to PHP-GTK that
> the callback has completed everything it needs to do and that it
> shouldn't be called anymore. Returning false, or something that
> evaluates to false such as nothing, indicates that the callback still
> has more work to do and should be called again at the next interval.
>
>>
>> Is it right, that i could end my function getSearchResultForStringFilter
>> with "return true", or should i also remove this?
>>
>>> public function getSearchResultForStringFilter() {
>>> Gtk::timeout_add(1000, array($this, 'getSearchResultForString'))
>>> return true;
>>> }
>
> You can leave the return true here since it is not being used as a
> callback method.
>
> --
> Scott Mattocks
> Author of: Pro PHP-GTK
> http://www.crisscott.com
>
> --
> PHP-GTK General Mailing List (http://gtk.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
--
View this message in context: http://www.nabble.com/Problems-with-Gtk%3A%3Atimeout_add%28%29-tf2635974.html#a7358707
Sent from the Php - GTK - General mailing list archive at Nabble.com.