Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot call SetFocus from within LostFocus
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00627605
Message ID:
00627737
Views:
11
Hello Floyd.

There seems to be what I would call a bug in the error trap. If the subform is invoked by the valid event of the higher level form, the local error trap reports an error in the local event and then the debugger presents the local code.

This is not a bug. This is by design and it makes perfect sense. You cannot have a Valid() anywhere in the calling stack. This is because the valid method is used to decide where or not a control is allowed to lose focus. So it makes no sense to set focus to something else before you know whether or not the current control is allowed to lose focus.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform