Re: Re: Re: [PHP-GTK] Progress/Status of Data inload in a popup window
| From: | Rich Payne | Date: | Wed, 31 Oct 2001 01:32:43 +0000 |
| Subject: | Re: Re: Re: [PHP-GTK] Progress/Status of Data inload in a popup window | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-497@lists.php.net to get a copy of this message | ||
On Tue, 30 Oct 2001, PQ Administrator wrote:
> Thanks for your reply, im actually new to GTK... is gtk::events_pending(), etc .... a
> handler?
> How would I implement that?
Well, I haven't seen your code but I'm assuming you're trying to update
the progress bar as you pull data (to/from a DB etc...). The problem is
that while you may be updating the progress bar, the GUI never get updated
as you're using the one available thread for your work. What that little
loop does is to check if there's any GTK+ related work to be done, and if
so do it, then go back to what you were doing before. So the code might
look something like this:
while ($row=mysql_fetch_object($result_set) != FALSE) {
while (gtk::events_pending())
gtk::main_iteration();
do_someting_with_the_result_set($row);
update_status_bar($new_value);
}
Does that make some sense?
--rdp
Thanks again!
-----Original message-----
From: "RichPayne" <rdp@talisman.alphalinux.org>
To: "PQAdministrator" <pqadmin@physicianquest.net>
Cc: "PHP-GTK" <php-gtk-general@lists.php.net>
Date: 10/30/2001(Tue)16:03
Subject: Re: [PHP-GTK] Progress/Status of Data inload in a popup window
I think the old:
while (gtk::events_pending())
gtk::main_iteration();
is your friend here. There's also an example status bar app at
php-coders.net (or is that php-coder.net, don't have time to check at the
moment).
--rdp
On Tue, 30 Oct 2001, PQ Administrator wrote:
>
Thanks for the help on my last problem with passing the objects from func
to func, I figured it out (sometimes its right in front of you!) ... I do
have another ? however.
Im trying to create some type of status window with either dynamic labels
or progress bar which shows the status of the data inload into the
application.
Right now when I start up the app the screen is just stuck not displaying
anything as if its locked up while the data gets inserted from the DB into
the Clist's.
When I tried creating a window which tells the user to wait while data is
being inloaded, and then lets them know when its done, it gets "freezed
up" as well.
How can I create a popup window which can display this without being
frozen by the parent windows data inload?
And how do I do the progress bar from a MySQL/ODBC query(s) (NOT
successful here yet!)
TIA
Troy McComas
Networks/System Admin. & Developer
PhysicianQuest.com
admin@physicianquest.com
Office - (818)550-8777 or (626)282-0288
Cell- (626)255-9833
Powered by PhysicianQuest.com
--
Rich Payne
rpayne@alphalinux.org www.alphalinux.org
Troy McComas
Networks/System Admin. & Developer
PhysicianQuest.com
admin@physicianquest.com
Office - (818)550-8777 or (626)282-0288
Cell- (626)255-9833
<!-- -->
Powered by PhysicianQuest.com
--
Rich Payne
rpayne@alphalinux.org www.alphalinux.org