Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Valid vs. LostFocus
Message
From
09/04/2003 15:55:00
 
 
To
09/04/2003 12:59:37
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00775350
Message ID:
00775729
Views:
13
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform