Re: Re: [PHP-GTK] timeout_add () crashes in Windows me

From: Date: Mon, 14 Oct 2002 09:23:35 +0000
Subject: Re: Re: [PHP-GTK] timeout_add () crashes in Windows me
Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-2532@lists.php.net to get a copy of this message
"Steph" <sfox@php.net> schrieb am 11.10.02 13:23:52: > I just got around to playing with your code, it crashes here too (win98, > and with 3 different PHP/PHP-GTK combinations including standard > distro). But _not_ when I call gtk::timeout_remove() when the condition > is satisfied .. which is what's supposed to happen (i.e. the stuff below > works fine). Thanx a lot! Now that code finally works! :)) > > why would returning true work on nix? anyone? > > <? > function bla (&$count) { > global $handle; > if($count < 10) { > echo "$count\n"; > $count++; > start(&$count); > } > else { > gtk::timeout_remove($handle); > gtk::timeout_add(100, array('gtk', 'main_quit')); > } > } You probably needn't remove $handle. If you return 0, it's removed anyway, just as in the case above. > function start(&$count) { > global $handle; > $handle = gtk::timeout_add (100, "bla", &$count); > } > > $count = 0; > start($count); > gtk::main(); > ?> > ________________________________________________________________ Keine verlorenen Lotto-Quittungen, keine vergessenen Gewinne mehr! Beim WEB.DE Lottoservice: http://tippen2.web.de/?x=13

« previous php.gtk.general (#2532) next »