Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Running both the class method code and the userdefined
Message
De
26/07/1997 07:58:01
 
 
À
26/07/1997 03:32:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00041688
Message ID:
00041795
Vues:
32
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
Fil
Voir

Click here to load this message in the networking platform