Re: RES: RES: [PHP-GTK] Help with Dialog/Popup
| From: | Christian Weiske | Date: | Wed, 03 Aug 2005 19:53:48 +0000 |
| Subject: | Re: RES: RES: [PHP-GTK] Help with Dialog/Popup | ||
| References: | 1 2 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-6154@lists.php.net to get a copy of this message | ||
Hello Neil and Piero,
> I see how I could use gtk_timeout to launch my function seperately from the main
> process, but then how would I ever know that the function is complete?
gtk::main_iteration does *not* pass the control to gtk for all the time.
You must think of a queue in which several events are waiting to be
executed. gtk::main_iteration executes exactly one of this waiting
events. while(gtk::events_pending()) {...} loops as long as there are
events in the queue. If all events have been executed by
main_iteration(), the loop ends and you (resp. your script) has control
again.
> Is there a way to spawn threads in php? I can't find anything in the
> documentation...
No.
So you have to do the iteration loop periodically in your function,
because otherwise the user interface blocks as long as your function is
being executed.
Regards/MfG,
Christian Weiske
--
XMMS is playing now:
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc