Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can I suppress the valid method from firing?
Message
From
20/09/2002 12:47:36
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00702841
Message ID:
00702844
Views:
8
We do something similar. Have you tried issuing:

ON KEY LABEL F2 DO pop_fields WITH VarRead()

and then putting a parameter statement in the top of pop_fields to store the passed value to a variable to use for the check in the case statements? Just a thought.

What we do is:
*--Calling program
ON KEY LABEL F2 DO userhelp WITH program()

*--userhelp.prg
PARAMETERS mprogram

varname = SYS(18)    && current @...GET field variable
paren = AT("(", varname)
IF paren > 0
    subscript = VAL(SUBSTR(varname,paren+1,2))
    varname = LEFT(varname, paren - 1)
ENDIF
varname = LOWER(varname)
DO CASE
CASE varname = "m.letter"
    IF mprogram = "QUOTE"
        DO ("ltrsel.spr") WITH "letter"

*ETC...
>We're still in the process of converting from a FoxDOS system, so I know that makes things a little funny to bein with but there is still a puzzle to me.
>
>We're running in VFP 7.0 but we still have a few data entry screens running with the old says/gets and read cycle. We do the following at the beginning of our code:
>
>on key label F2 do pop_fields
>
>Our pop_fields function evaluates varread() and determines if a popup should be executed on that particular field.
>
>Example:
>case varread() = "STATE"
> do p_popup with ...
>
>If in my pop_fields I say something like:
>
>case varread() = "STATE"
> = messagebox("Hello")
>
>The valid event for STATE is not fired. However, if I actually do my popup routine (which displays a modal form showing a list of valid states) the valid event of the get field is fired.
>
>How does the messagebox supress the valid event and can I cause the same behaviour when I call my popup form?
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform