Arnon,
I have always wondered about the following, and this looks like a good time to ask. . .
IF I had a class (son - A) subclassed from father B and grandfather C, and each had some Init() code and I wanted to ensure that *each* had its code execute when I invoke A.
It seems like a simple DODEFAULT will simply cause B's Init() to execute.
1) Is this correct?
Assuming it *is* correct, it seems the only way to ensure that C's code also executes is to code a DODEFAULT in B. Which would be fine if one ALWAYS wanted to execute the code in A too.
2) But how would one do this if one only wanted to execute C's code sometimes (always B's but only sometimes a's)?
3) How would one code to execute ONLY C's code (bypassing B's?
This is more for academic knowledge than anything else.
regards,
Jim N
>>Thank you for your quick answer! From your answer finally I got
>undrestood
>>the topic, and got the tip where to start the searching.
>>But I didnot know, that it is possible to run a code not from the parent
>>class, but from grandfather or even higher classes?
>with the :: you can run code from paretns.grand parents etc.
>
>VFP5 has a shortcut for calling tha direct - parent in the form of
>DODEFAULT()
>
>Arnon
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement