Re: Problems with Gtk::timeout_add()

From: Date: Wed, 15 Nov 2006 13:32:49 +0000
Subject: Re: Problems with Gtk::timeout_add()
References: 1 2  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-7471@lists.php.net to get a copy of this message
Ok, i will remove the "return true", but why? :-) Why will this work, if i dont return anything? 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; >} xxoes wrote: > > public function getSearchResultForString() { > // get result from database > return true; > } > > remove the "return true;" > > mfg xxoes > > > ecc schrieb: > >>Hi, >> >>i want to add a timeout to a GtkEntry input, because not every keystroke >>should query the sql-database. >> >>i´ve trying something like that (pseudo code!): >> >>$textWidged->connect_after('changed', array($this, >>'getSearchResultForStringFilter')); >> >>public function getSearchResultForStringFilter() { >> Gtk::timeout_add(1000, array($this, 'getSearchResultForString')) >> return true; >>} >> >>public function getSearchResultForString() { >> // get result from database >> return true; >>} >> >>That works fine, but i have the problem, that the Gtk::timeout_add will not >>stop! How to prevent this? >> >> > > -- > 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#a7357625 Sent from the Php - GTK - General mailing list archive at Nabble.com.

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