Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Skipping inheritance
Message
From
08/06/2003 15:53:06
 
 
To
08/06/2003 15:50:53
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00797802
Message ID:
00797815
Views:
22
>>>>I'm using VFP 7.0
>>>>
>>>>In one of my classes, I want to skip the parent.method() code, but still get the parent.parent.method() code.
>>>>
>>>>I remember something about the :: operator, but cannot find anything in the help file that helps.
>>>>
>>>>TIA
>>>
>>>It is called the "scope resolution operator", but I can't find it in the help right now, either.
>>>
>>>In most cases, in VFP 5 or later, it can be replaced with DoDefault(), but you can still use it, for instance, for the case you mention.
>>>
>>>I think a complete example would be like this:
>>>
>>>
>>>lnReturnValue = GrandParent::MyClass(Par1, Par2)
>>>
>>>
>>>Of course, you might omit the return value or the parameters or both, depending on your specific needs.
>>>
>>>HTH,
>>>
>>>Hilmar.
>>
>>Hi Hilmar,
>>
>>>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
>
>How about...
>
>This.Parent.ParentClass ?
>
>BOb

Nope, that won't work... sorry.
Previous
Reply
Map
View

Click here to load this message in the networking platform