Re: cos we really need another chat system...

From: Date: Thu, 08 Nov 2001 14:23:53 +0000
Subject: Re: cos we really need another chat system...
References: 1  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-546@lists.php.net to get a copy of this message
On Thu, 08 Nov 2001, Simon Wheeler wrote: > NO worries , Its just for part of my learning process (a slow one at that) and a project to > play with. > > So I am making a chat app with PHP-GTK, but I need to periodically ask the server for > information and grab the latest XML file/whatever. > So I need a loop that every $x seconds runs a function. This I can achieve , but not without > freezing the whole app, I mean its working... and refreshing the data but I can not actually use the > app when this is happening, which is all the time :), using sleep() for timing etc does exactly > that. > > Any ideas/examples would be much appreciated. > > I guess the 'while (gtk::events_pending())' thingy (I think thats the technical > term for it) is going to be mentioned again , which is a shame as I have had no success (or > errors!) using it. Use gtk::timeout_add() to run your function every so often, and then inside the function you do your XML fetch and don't forget the gtk::events_pending() thing. -Andrei * http://www.zend.com/comm_person.php?id=24 *

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