General information
Category:
Coding, syntax & commands
Thanks Christof,
your change works great in the old Fox 2.0. Additionally I removed tests for _Windows (3 plcs) and _Dos (1 place), and changed #DEFINEs to a PUBLIC declaration and PUBLIC variables = values syntax.
One suggestion for rollover date: Instead of fixing it to one year (1950), or programmatically changing it based on type of date input (birthdates, invoice date, etc.), I set rollover year to be YEAR(DATE())-93. That way, rollover "slides" as the years progress. Birthdates entered will be good for anyone 93 years old or younger, and dates entered up to 5 years in the future will always be interpreted correctly. IOW, it won't be necessary for developer to come back in 5 years to reset a rollover year (such as 1905) that would otherwise mess up invoice dates on and after 01/01/06.
I tested a browse of date fields and it works well. It highlights twice on 02/29/00 and takes a little time to validate, but all other dates are swift to validate. More important to those of us who don't want to modify table structures that use date fields, your solution gets the job done correctly and with the least fuss IMHO.
Kudos to you, Christof.
Bill
PS
Anyone reading this thread must remember (as you point out in your article) that Fox's CTOD() & LUPDATE() aren't 2000 compliant. I could not find the replacement functions anywhere; I have the March 98 Advisor mag. but not the resource disk. I wrote my own CTOD(), but others may be interested to know how to get them.
>Hi Bill,
>
>>The solution that Christof Lange developed for Fox 2.x (See March 98 Advisor) uses the ObjVar()function. ObjVar()came out in 2.6 according to Hacker's guide. I'm using Fox 2.0 and wonder if there is a workaround for getting a GET object's variable name, knowing the GET number.
>
>If you only use memory variables in your GETs, you can replace that line with:
>
> lcVar = "M." + VarRead()
>
>Otherwise you might have to use another public variable and set in the WHEN of each GET. It requires some more work, but is certainly doable. I'm not sure whether I used more functions that are not available in FP 2.0 or if it has the same bugs as FP 2.6.
>
>
>Christof
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only