I'm coming to realize that this is not possible but this is what I'm trying to
@ 5,8 say "Effective Date1" @ 5,24 get date1 valid valdate1() @ 7,8 say "Effective Date2" @ 7,24 get date2 valid valdate2()
store " " to yorn @ 9,8 say "Type Y to continue blank to cancel"; color scheme 2 @ 9,50 get yorn; picture '!' read
if PassValidationRules() = .f. setfocus on date2 endif
Do SaveToDB()
I want to do it this way for the following reasons:
-centralize my validation -avoid touching legacy code (valdate1, valdate2) I'm happy to add code but I like to avoid editing existing code -valdate1 and valdate2 does not run if the user hit the escape key
Thanks Wayne
On Wed, Jun 1, 2016 at 10:06 AM, Jean MAURICE jsm.maurice@wanadoo.fr wrote:
Hi Wayne,
after the READ, there is no more 'event' you can work with (I mean there are no more active GET). So, yes, _curobj can only be set in functions (clauses ?) called from a @GET command. I remember that you can also set the first GET to be active in the READ statement but I don't remember the name of the clause.
If you want to build only one procedure to 'manage' the active GETs, I think you can write your code in the VALID clause of the READ. As long as the valid returns .F., the READ stay active and _curobj is valid.
The Foxil
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]