Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dodefault nodefault dodefault
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01417200
Message ID:
01417201
Views:
88
The NODEFAULT statement only sets flag that tells VFP do not perform default processing for that VFP event after it finishes. Functionally, it doesn't matter where you put it.

>The pieces of code below both have dodefault() and nodefault, but their order differs. Some would argue that the effect is entirely similar, but is this always true?
>
...
>dodefault()
>nodefault
>...
...
>nodefault
>dodefault()
>...
>I have always thought of NODEFAULT as a toggle that will prevent the intrinsic native behavior of the event, which will fire after all code. But I have also always thought of the intrinsic native behavior as firing ONLY in the topmost (youngest child) subclass. That is, all parentclasses and the base class that are visited via DODEFAULT() will not fire the intrinsic native behavior.
>
>Now I have to deal with a subclass that appears to fire the intrinsic native behavior twice. The youngest child contains no NODEFAULT, so the intrinsic native behavior fires at the end of the event, but it also appears to fire as a result of DODEFAULT() in the parent class. This is odd, to say the least. I have searched here and there. There is some debate as to whether it is a bug or a confusing and badly documented design feature.
>
>I have tried to discover whether or not there is a difference between declaring NODEFAULT prior to DODEFAULT(). The idea is that this may actually also prevent the intrinsic native behavior in the parent class(es).
>
>Who can help?
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform