gnope php gtk gui gnope.org  

Continuous loop

 
Post new topic   Reply to topic    gnope.org Forum Index -> PHP GTK2 Beginners
View previous topic :: View next topic  
Author Message
Vorash



Joined: 23 Oct 2006
Posts: 4

PostPosted: Wed Oct 25, 2006 4:51 pm    Post subject: Continuous loop Reply with quote

Hey,

I am trying to make a simple instant messenger that uses a PHP class do the AIM stuff (connect to the server etc)...

http://www.phpclasses.org/browse/package/1755.html

...My problem is that this bit of code...

Code:
while(1){
   $this -> aim -> recieve();
   $this -> aim -> myLastReceived = "";
}


...has to continuously check for new data. If I add this before Gtk::main(), then the window freezes, and if I add it after Gtk::main(), then nothing happens until I close the window.

Any ideas of what I can do?

Thanks
Back to top
cohort



Joined: 07 Feb 2006
Posts: 47

PostPosted: Thu Oct 26, 2006 12:04 am    Post subject: Reply with quote

Use a timeout function.

See thread http://www.gnope.org/forum/viewtopic.php?t=58&highlight=timeout
Back to top
Vorash



Joined: 23 Oct 2006
Posts: 4

PostPosted: Thu Oct 26, 2006 5:22 pm    Post subject: Reply with quote

Thanks.

I gave up on it in the end. Decided to try something else, just wish there was more documentation on certain classes Sad
Back to top
Display posts from previous:   
Post new topic   Reply to topic    gnope.org Forum Index -> PHP GTK2 Beginners All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Templates enhanced by DigiWiki. Hosting by Tradebit.