Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I create a new VCX of subclasses programatically
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00142974
Message ID:
00145119
Views:
72
>One other question on sub-classing:
>If you have a sub-class that modifies a property from the default value of the baseclass, and then later that property is removed from the baseclass, that property no longer exists in the sub-class. You don't get any error or any indication that the property no longer exists in the base class, until you try to reference it in code for your sub-class. I would have thought that the sub-class property would have just become a new property belonging only to the sub-class. Is this correct functionality?


Fred,

That is perfectly correct behavior. If the property is inherited fromt eh parentclass and you later remove it form the parent class, then it is no longer inherited and it does not show in the subclass. You would need to visit the subclass and add that property.

Having a property or method that is not in the parent class can be indicative of a poor class design. The purpose of the highest class level is to define the public interface for all of its subclasses. Introducing a new property or method down the inheritence tree causes the interface to change within the particular class.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform