Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Valid vs. LostFocus
Message
De
09/04/2003 15:55:00
 
 
À
09/04/2003 12:59:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00775350
Message ID:
00775729
Vues:
14
To all on the thread,

Thank you very very much for your insights. This has been most educational to me. Traditionally, I have only used lostfocus() in a limited manner - generally to activate/deactivate some form objects, and to set the focus to another object based on the return of the valid() as mentioned in the thread. In that if the valid() did not return .t.; lostfocus would not fire.

However, I now see that certain other actions can be tied with a bit more 'finesse' - using the valid()/lostfocus() match-up. A good example would be the 'client adding' mentioned in the thread. I never thought of putting a oForm.cmdButtonAddClient.Click() event there.


So to sum it up (again correct me if I am wrong):

1) The general rule is to use valid for the contents of the current control for correct data entry.
2) The general rule is to use setfocus to ascertain 'what should happen next' based not only on the contents of the current control; but also other controls/values of the current session as well.

Again, thank you very much for the input. Sometimes these ears need to hear the words of others - instead of these nasty voices in my head telling me to 'guess'.... :-)

Ric
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform