Re: Please!!
| From: | Christian Weiske | Date: | Wed, 26 May 2004 05:48:45 +0000 |
| Subject: | Re: Please!! | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-4576@lists.php.net to get a copy of this message | ||
Hi
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
Please can I have a little example using (gtk::events_pending()) { gtk::main_iteration(); }When I look at the posted sourcecode, I think you didn't really understand the use of events_pending and main_iteration: If you want to keep your app open so that it reacts to user input and keeps the window showing, you go into the main loop with
GTK::main();If you are in the main loop and have a function which needs some time to execute, then it is a good idea to let the GUI update itself from time to time. E.g. when you calculate something, and the calculation needs 20 seconds to finish, the app is blocked - you can't click anywhere to stop it or so. If you stop your calculation every second and let the gui handle the events, it's a lot better, because the app responds to the user. The events_pending/main_iteration is for this. Regards, Christian Weiske -- Always forgetting birthdays? Try birthday reminder! http://www.cweiske.de/birthday.htm -- XMMS is playing: Shakira - Poem To A Horse
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc