Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DoDefault and inheritance
Message
From
21/02/2008 05:38:09
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
DoDefault and inheritance
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01294645
Message ID:
01294645
Views:
64
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.
Next
Reply
Map
View

Click here to load this message in the networking platform