Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Does it take time to DODEFAULT()
Message
From
23/12/2019 13:22:48
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
01672425
Message ID:
01672427
Views:
78
>Hi,
>
>I have a method in a text box base class (CUSTOM_SETUP) that will have a line DODEFULT(). That is, this method will not have any meaningful code. This method is called from the INIT method of this class. I have not noticed that it takes any time, when doing a very superficial test. But in general does this call to a method with DEDEFAULT take any time when about 50 text boxes are instantiated (which have this code)?
>Alternatively, I can comment the call to CUSTOM_SETUP and I can even do away with the INIT method (set it to default) since it won't have any code. But, in case in the future, I may need it, I thought I would leave these methods with DODEFULT().
>

You don't need DODEFAULT() in methods of your "base" classes unless there's also a NODEFAULT there. If a class is derived right from VFP's classes, there's no code you need to ensure runs.

In general, you don't need DODEFAULT() unless you put code into a method. An empty method will automatically run the code from its parent class.

Tamar
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform