Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Do all Valid
Message
 
À
07/03/1997 05:35:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00023276
Message ID:
00023712
Vues:
26
A more "generic" way to check to make sure all the input is valid would be to create a FOR...ENDFOR loop using the ControlCount property of the form. Once you know the number of controls on a form you can reference each one by index then check to see if it has a valid event and if it does, fire the valid.

Or, you could create a "valid collection class" that automatically stored refrences to any control with a valid event and then create a "DoAllValid" method for that class. This way is obviously more involved, though. But, hey, I like programming for programming's sake ;-).


Michael G. Emmons
Visual Foxpro Programmer Extroidinaire


>We use Vfp3.0
>Since we don't want to write validation rules on the tables contained in the database.
>We prefer to validate the input on the valid method on the textbox.
>There is a 'Save' button on the form to update record. Can the Save button call all valid methods on the form?

Michael G. Emmons
memmons@nc.rr.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform