Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SetFocus Question
Message
 
 
To
23/02/1999 16:19:22
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00190627
Message ID:
00190797
Views:
11
Ed,

The BaseClass behavior always automatically occurs at the end of all overridden method code. So the SetFocus() was actually setting the focus to that control, but then the BaseClass behavior kicked in and moved the focus to the next tab order control. By using a NODEFAULT you prevent the automatic BaseClass behavior. This gives NODEFAULT two purposes. 1) Completely prevent the BaseClass behavior. 2) Alter when the BaseClass behavior occurs. It's usually not good to completely prevent the BaseClass behavior, so you combine an explicit call alnog with the NODEFAULT:
nodefault
maybe some code goes here
BaseClass::Method()
other code goes here
>OK, so if you permit default to occur, lostfocus will set focus to the next object in the tab order overriding your setfocus() instruction.
>
>OK, now I get it. Thanks.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform