Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Easy way to globally SET CENTURY TO 20?
Message
De
03/01/2000 12:04:39
 
 
À
03/01/2000 11:05:28
Chris Crachiolo
Blackmoor Associates Incorporated
New York City, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00311686
Message ID:
00311737
Vues:
14
>I have CENTURY set to ON in all my forms; however, even though my users can omit the year portion of a date and let it default (now) to 2000, they are in the habit of entering a two-digit year -- and since I've neglected to add SET CENTURY TO 20, this becomes 1900 when they enter "00". I know that SET CENTURY is scoped to the current data session, but is there any way to avoid editing all my forms (all of which have private data sessions)?

Easy - make a change to the class that your forms inherit from and put the SET CENTURY TO in that code. Of course, if you didn't create your own base class and instead went directly from the native VFP Form base class, this doesn't work right off the bat - fix it now. Create a subclass of the base class, and use that as the basis for all your forms. You can hack the SCXs to change the parent class programmatically (back up the SCXs first), and just don't repeat the mistake.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform