Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to pause for user input?
Message
 
 
To
08/08/2001 16:38:59
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00541540
Message ID:
00541584
Views:
15
This message has been marked as the solution to the initial question of the thread.
I think you are looking into this problem from the wrong angle.
Create form that shows questions and accepts answers. On that form create custom method GetNextQuestion with code like this
Select Mytable
IF NOT EOF()
   Skip
   Show new question
   create cursor of valid answers
ELSE
   * No more questions, Set property of the form to indicate that
   Thisform.NoMoreQuestions = .T.
ENDIF
and call it from Submit button on your form. This way a user controls the flow of the program. It's very easy to add 'Back' and 'Cancel' buttons to this form.

>Hi,
>
>I have some code that looks like this:
>
>
>scan a table of questions
>   ask question
>   create cursor of valid answers
>   user picks answer from list of valid answers  && problem here
>endscan
>
>
>My problem is that I don't know how to 'pause' for user input in the middle of a scan loop. I was thinking of setting up a form and using addobject at the end of the scan loop to add a new combobox. But how can I allow the user to answer the question before it goes back to the beginning of the scan loop where it will generate an error message?
>
>Any suggestions are appreciated.
>
>Thanks,
>Chris
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform