events_pending() Q

From: Date: Thu, 16 May 2002 18:31:48 +0000
Subject: events_pending() Q
Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-1909@lists.php.net to get a copy of this message
Hi In the snippet below I have a function that creates a modal dialog $auth with 3 labels and a button, after the window is created and shown a query is run against a remote DB via HTTP, this takes 5-10 seconds unfortunately the window does not fully 'show' , i.e. the frame of the window appears but is not 'filled in' until the query has run and returned its data, the 'while (gtk::events_pending()){' bit helps somewhat but the window still 'hangs unfinished' until the QUERY() function returns its stuff.... in fact the script seems after the events_pending loop to run backwards in places , i.e. $whatever->set_text($what); $whatever1->set_text($what1); $whatever2->set_text($what2); seem to be set in reverse order,$whatever2 being shown first for instance? I assume I am using the events_pending in totally the wrong way ? ....................................................................... // created modal window $auth .... // show it $auth->show_all(); // lab is a label in the $auth window// $lab->set_text('contacting server ...'); // at this point the $auth window should have already been built and 'shown' while (gtk::events_pending()){ gtk::main_iteration(); $yaks=QUERY($query,true,1); file://the slow bit - 3-5 secs to fetch data from online db via http } // do stuff with the retuned result...

« previous php.gtk.general (#1909) next »