Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I create a new VCX of subclasses programatically
Message
From
10/10/1998 13:07:37
 
 
To
10/10/1998 09:21:09
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00142974
Message ID:
00145680
Views:
46
>>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?
>
>The property should probably remain hanging and be disregarded. You can try out what happens by simply adding a line to the Properties memo - the unregistered properties are ignored. To register a property to be a new one for a class, it needs an entry in Reserved4. Just add one in the editor and see what happens in the Reserved4 (or was it 3?).
>
>You may actually write a checker, which would scan the properties memo for any properties which don't exist in the parent class, and have them added in the ReservedX, and recompile the class in the end.

I hadn't examined the details closely enough to see the ReservedX entries for the properties. This was merely an exercise, and I didn't really have any properties that were removed (yet), and I was just wondering what would happen if I did that. It's the sort of thing that may come up once we distribute our classes to the end-user. Be prepared...
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Reply
Map
View

Click here to load this message in the networking platform