Re: refresh problem
| From: | Rich Payne | Date: | Thu, 22 May 2003 17:22:23 +0000 |
| Subject: | Re: refresh problem | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-3467@lists.php.net to get a copy of this message | ||
Well, it's a little difficult w/o seeing all the code, but at a guess
I'd say you need to add in one of the infamous:
while (gtk::events_pending())
gtk::main_iteration();
blocks within your loop. This forces the app to go and deal with any
pending GTK events, like updating your GUI.
--rdp
silver_dragoon said:
> hi all
>
> i'm currently writing a small piece of code which intends to connect to
> an irc server and permit the user to chat a little (yeah I know phpirc
> already exists but i'd like to do some simple stuff on my own).
>
> The connecting process works perfectly, but when the script starts
> communicating with the server using the socket_read function, the
> display freezes, only the dos console is updated. I have a
> gtk::timeout_add('20', "update_irc", $textepopup, $socket);
>
> which makes a
>
> $datairc = @socket_read($socket, 10240);
>
> when called. I noticed that when I removed this line, the were no more
> bugs. The timeout is set just before the gtk::main() function... does
> anyone know why my screen freezes ? $socket is a global var which is
> set using another function just before which connects to the server...
>
> thanx a lot
>
> ++ silver_d
--
Rich Payne
http://talisman.mv.com
rdp at talisman dot mv dot com