Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DoDefault and inheritance
Message
 
 
To
21/02/2008 09:27:46
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01294645
Message ID:
01294728
Views:
14
>Following proper OOPS techniques, Thomas Ganes suggestion is the correct one. Create a second method in A and override it in B. When the Init calls the method, it will call the local version. If you need the B of the local method to call the parent version, then use DODEFAULT().
>
>
Thomas and Marcia suggested this technique. We're also using hook methods.

So, line 10 will become a separate method in the Base class and the derived class would only need to overwrite one method. Hopefully line 10 can be easily created as a separate method.

Otherwise I would use Borislav's idea of invoking this line conditionally based on some property.

In either case, this assumes that we would need to change class A.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform