Hi Ramani,
While we're on the topic of NODEFAULT and DODEFAULT(), I thought I should also clarify for any readers out there that they are
not opposites!
The first thing to realize is that there are two types of behavior for any given method. First is the native behavior. In the case of the keypress event of a textbox, the native behavior is to display the character you type. Second is the behavior you have coded. That could be in your base class or any class down the class hierarchy.
When you type code into a method, you are overriding any code you have in the class hierarchy, unless you have DODEFAULT(). The DODEFAULT() tells VFP to run the code you have in the parent class(es) at that point. The native behavior will still run in either case.
NODEFAULT is what you use when you want to tell VFP
not to perform the native behavior.
An example of how these interact would be the case of a textbox, where you have special code in the keypress method. If you create a subclass of this textbox, and want to add to the keypress code, you would need to add a DODEFAULT() to run the code you have in the parent method. But if you don't want the textbox to display the characters typed, you would also need a NODEFAULT.
-BP