Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SetFocus in VALID sometimes works!?
Message
 
To
01/06/2001 21:08:44
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00514105
Message ID:
00514554
Views:
14
>The VFP doc says that one cannot SETFOCUS in a VALID, RANGE-HIGH/LOW, etc. And yet, I have a form where I accidentally did this and Lo! it works most of the time, but fires an error "cannot setfocus in valid, ..." some of the time. I actually stepped through the code in VALID and watched it pass right over the SETFOCUS.

Arne;

What you will find is that it will continue to behave as you described and then one fine day (no day in particular), it will quit working! I have seen this occur and trust that setfocus and valid (etc.) do not mix. This type of behavior is something I call a “soft failure”. Sometimes code will work (that should not) and some time down the road it will come back to bite you.

Never deliver code of this type to a client or you may end up working at McDonald's in a new career field.

Tom
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform