timeout_add crashes on windows
| From: | elektronoize association | Date: | Tue, 26 Nov 2002 13:03:26 +0000 |
| Subject: | timeout_add crashes on windows | ||
| Groups: | php.gtk.general | ||
| Request: | Send a blank email to php-gtk-general+get-2738@lists.php.net to get a copy of this message | ||
This simple test program to GTk timeout_add causes windows crashes at the
second
refresh call :
<?php
if (!class_exists('gtk')) {
if (strtoupper(substr(PHP_OS, 0,3) == 'WIN'))
dl('php_gtk.dll');
else
dl('php_gtk.so');
}
$window = &new GtkWindow;
$window->set_title("test");
$window->set_default_size(500, 500);
$window->connect('delete_event', 'quitApp' );
$id = Gtk::timeout_add (1500, 'refresh' );
function quitApp() {
GLOBAL $id;
Gtk::timeout_remove($id);
Gtk::main_quit();
}
function refresh () {
print "refresh\n";
return 1;
}
$window->show_all();
Gtk::main();
?>
Why ??