waiting for user input.
| From: | ingui | Date: | Tue, 05 Mar 2002 01:36:56 +0000 |
| Subject: | waiting for user input. | ||
| Groups: | php.gtk.general | ||
| Request: | Send a blank email to php-gtk-general+get-1424@lists.php.net to get a copy of this message | ||
Hi i am doing a program in gtk-php.
This program is very recursive and has lots of iterations. At some
point during the program i need to ask the user for input, so the
program can continue with its execution.
My problem consist that when i ask the user for the input. The program
of course keeps running and wont draw the gtk window till it finds
GTK::main() and the end of the program. hence drawing the window too
late, and since i never get the input, the program does not work
correctly.
What i did was to call another program, which would ask for the input:
$input=exec("php -q ask_for_user_input.php");
So the program would no continue till the user had answered my
questions.
This works like a charm in linux, but not so in windows for it generates
a DOS shell (cmd.exe) to run the program
"php ask_for_user_input.php". I can not have this, if the user by
anychance clicks on the X in the toplever window of the DOS shell the
whole think breaks, besides it really looks lame.
My question: is there a way that while the gtk-php program is running,
to draw the windows. with out having to reach for GTK::main(). and
while the window is draw and waiting for the user input, the main script
will wait till it gets the answers before continuing execution.
Help apreciated.
and sorry if my english is rusty. have not used it for while now.