Gtk::set_timeout();

From: Date: Sat, 03 Mar 2001 07:01:53 +0000
Subject: Gtk::set_timeout();
Groups: php.gtk 
Request: Send a blank email to php-gtk+get-179@lists.php.net to get a copy of this message
Excellent work Andrei! gtk-php is fun. The only problem I've encountered is trying to use the Gtk::timeout_add(); function. It half-ass works, since it is recognized as a function and runs. The problem is that it only runs ONCE. Well, at least it is my understanding that once a timeout is set, it iterates over and over again on the specified interval until it is removed in with Gtk::timeout_remove(). Here's a hack I'm using in the mean time: ---------------------------------------------- function main() { myfunction(); Gtk::timeout_add(1000, 'main', NULL); } Gtk::timeout_add(1000, 'main', NULL); Gtk::main(); ---------------------------------------------- If the Gtk::timeout_add() function was working properly, this could be rewritten as: ----------------------------------------------- Gtk::timeout_add(1000, 'myfunction', NULL); Gtk::main(); ----------------------------------------------- And everything would be a lot prettier. Thanks, -Tony

« previous php.gtk (#179) next »