Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DoDefault and inheritance
Message
De
21/02/2008 05:38:09
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
DoDefault and inheritance
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01294645
Message ID:
01294645
Vues:
60
I have a class A whose "Init" method reads
Line 1
Line 2
.
.
.
Line 10    <-- (my subclass need a diff code for this line)
.
.
.
DODEFAULT()
and B is a subclass of A. For B, in its "Init" method, I want to have everything the same as A's except for Line 10, but I can't figure out a good way to do that...

I was thinking of copy all the codes in Init method of A and place them in Init method of B, then change Line 10 to whatever I want, but there is a problem in the last line -- DODEFAULT(). I can't place this as the last line in B's Init method (obviously, because I don't want to repeat lines in A's Init method), but I need to execute A's parent class Init method codes...

What is the best way to achieve the above, would anyone give me a clue?

Your suggestion will be very much appreciated.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform