Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Skipping inheritance
Message
From
13/06/2003 06:43:53
 
 
To
08/06/2003 15:15:44
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00797802
Message ID:
00799704
Views:
27
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
Previous
Reply
Map
View

Click here to load this message in the networking platform