Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Skipping inheritance
Message
De
13/06/2003 06:43:53
 
 
À
08/06/2003 15:15:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00797802
Message ID:
00799704
Vues:
26
To be honest, if you want to change the behaviour of the grandparent (this -> parentclass -> parentclass) and not use the behaviour in this.parentclass - then the design sounds wrong.
That often happens when you're modifying existing classes (I know from bitter experience) and the behaviours are at the wrong level in the hierarchy.

Sounds like you might want to consider not using inheritance to change the behaviour, but a collaborating object instead. Trouble is, in VFP 3,5,6,7 you have to design that - perhaps using a hook.
In VFP 8 you could use bindevents() to link one method to another, without the need for subclasses.

>>lnReturnValue = GrandParent::MyClass(Par1, Par2)
>I'm presuming that I would replace "GrandParent" with the actual name of my grandparent class.
>
>Do you know if there is some generic way to get at that name?
>I would like to allow for the possibility of inserting a class in between the current parent class and current grandparent class (redefine parent to ??, making the grandparent a greatgrandparent). I would still want to inherit from the new grandparent.
>
>Bill
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform