GenScrn X was a public domain GenScrn.Prg wrapper that allowed you to do wonderful things with the FoxPro2.X screen generator. Written by Ken Levy, GenScrn X is arguably the greatest tool/program ever written in FoxPro. VFP, with no screen generator, makes GenScrn X obsolete. But you can can still download the latest version of GenScrn X and a help file and the Tabs driver from my website at http://www.stevenblack.com/SBCPublicDomain.asp
I remember seeing a GenScrn X driver that create Y2K compliant date entry text boxes... I don't remember where I saw it. Has anyone seen it or used it? It certainly is an interesting way to solve the Y2K Problem for a 2.6 ap. How does GenScrn know if the field is a date field? (Answer: the data type is stored in one of the fields in the .SCX). If so, where can I find it? -- Bob Archer
This happens to be one of the very few articles available for download from the misers at Advisor Publications. The author is Christof Wollenhaupt. -- Steven Black
Steve, that but this is not what I am talking about. While Christof's code is incredibly good stuff, it doesn't allow you to override the rollover by entering the full four digit year. No, what I saw was a modification of GenScrn X that did something with date fields... I think it might have been in the UT file section, I'll have to look there.
Bob: Here's an approach I used. I apologize for lack of specificity--it's been a long time since I used 2.X and GenScrn X.
My driver for all forms (Hook 1?) created a private variable in the Setup called lxOldValue.
My driver for each field inserted into the When() of each field a call to store the current field's value to m.lxOldValue. This generically makes the prior value of every control available in the Valid() just in case it's needed. (Gee aren't things easier in VFP? :))
In the valid code for any date field, I included something like the code below:
IF m.lxOldValue <> m.SchDate && date edited
IF YEAR( m.SchDate ) < 1930 && 1930 is app-level "rollover"
* User probably entered 2-digit year.
m.SchDate = GOMONTH( m.SchDate, 12 * 100) && Add 100 years.
If any user absolutely needs to enter a pre-1930 date, they can trick this procedure by entering, say, 1820 to get 1920. I would post the code, but it was all linked into a huge GSX driver program that was dependent on my 2.6 Frame Work data dictionary tables. I can provide more details if needed. -- Randy Pearson
See also GenMenu X and GenRepo X, both of which are still very useful in VFP.-- Steven Black
( Topic last updated: 2003.03.29 11:51:34 AM )