Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DoDefault and inheritance
Message
 
 
À
21/02/2008 09:27:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01294645
Message ID:
01294728
Vues:
15
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform