>I suppose pressing K_ESC (chr(27)) during a READ will ends
>the read WITHOUT firing the VALID functions of the GETs.
>But lately, I found that wasn't the case in my screens,
>notably those generated by GENSCREEN. The VALID functions
>were fired even if I pressed K_ESC (during a READ CYCLE).
>
>I couldn't reproduce the adnormal behaviour if I wrote
>a simple program, like this one:
>
> * main()
> m.xx = 0
> @05,05 get m.xx valid v_xx()
> read cycle
> return
>
> function v_xx
> wait window "haha"
> return .t.
>
>Have you ever heard of this adnormaly? For the meantime,
>I need to insert codes to check for K_ESC in all VALID
>functions.
In the Valid, put:
IF LASTKEY() = 27
* Escape pressed
RETURN .T.
ELSE
* Validate the data
ENDIF
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer