Re: question: clock demo
| From: | Markus Fischer | Date: | Thu, 04 Oct 2001 11:29:44 +0000 |
| Subject: | Re: question: clock demo | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-198@lists.php.net to get a copy of this message | ||
On Thu, Oct 04, 2001 at 11:37:00AM +0200, kemar@ltcgroup.de wrote :
> but I have a problem with one situation,
>
> how do I register a "default" handler, who is called
> by default, where I can run permanent a loop or something,
>
> - display a date/time in a textfield
>
> After running this registered handler he should handle his
> own stuff, by simply exit my own handler,
I'm not sure what you exactly mean. Can you provide the shortest
example with comments and attach it?
If you want to update a textfield just set a timeout function
with
Gtk::timeout_add(1000, 'update_timer');
and be sure to return true in the handler so he gets called
continuously.
function update_timer()
{
global $clock_text;
$clock_text->set_text($date); // or something
// like this; you figure out
return true;
}
- Markus