Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Read Cycle
Message
 
To
19/08/1997 17:30:49
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00045674
Message ID:
00045786
Views:
41
>Inside a read cycle I am trying to use F10 popup to fill in 2
>different variables in 2 different get statements.
>Example:
>
>On Key Label F10 DO Findit with startCust
>
>This will return the customer number to that variable
>but I need it to do it to the next variable endcust in the next get statement.
>
>Any suggestions?
Andy,

First your answer;

ON KEY LABEL F10 DO FindIt WITH StartCust, EndCust

pass both vars to the routine and set them both in the routine.

Now, there is a hidden problem with this approach and that is that OKL's are intercommand interrupts, meaning that the OKL will fire between executing commands. This means that if the vlaid code for a get is running and the user hits F10 that valid code will be interrupted and the OKL routine will run. This could cause major headaches in the app, bot only the data problems it can create but also the process of finding out what went wrong.

A better approach is to use menu short cuts. This can be done without ever showing the menu. In the form's Setup you can;

DEFINE POPUP MyPop AT 0,0
DEFINE BAR 1 OF MyPop PROMPT "Junk" KEY F10
ON SELECTION BAR 1 OF MyPop DO Fintit WITH StartCust, EndCust

In FindIt you check _curobj to see if you are in the right GET, if not just return otherwise do your thing.

Make sure you don't ACTIVATE the popup and it will never be seen, ni the cleanup for the screen you can release popup MyPop.

Menu short cuts are ONLY available when Foxpro is in a waiot state expecting user input, so it will not interrupt running code like OKL will.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform