Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Class inheritance versus Object (run-time) inheritance
Message
From
07/07/1999 23:40:29
 
 
To
07/07/1999 20:14:24
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00238626
Message ID:
00238669
Views:
10
Inheritance is only from the derived class to its parent class (or, the subclass inherits from its superclass). The relation reusulted from derivation cannot be changed at runtime (at least, not in VFP).

An object contained by an other object cannot inherit from the container. In this case, we talk about composition.

In VFP, you can use PEMSTATUS() to test for the existance of a property or method. TYPE() can also be used to test for the existance of properties. Using these functions, the contained object can test if specific properties/methods are defined for its container, and, if they are there, the contained object can use them. Although this is not inheritance, it's extremly powerful and it can be used to implement really cool mechanisms.

Vlad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform