Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Subclass method disappears when parent method name chang
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00148378
Message ID:
00148617
Views:
24
Hi Jim,

>The child class NEVER had that method in it. The method was in the parent class and you changed it there, the child simply inherited from its parent. When the parent no longer has a method named Foo, then the child class no longer has a method named Foo also.

But VFP is inconsistent here. For example, my VFP 5 base classes had a method AddProperty() that merely called ADDPROP(). When I opened this class in VFP 6 I could see all the code in it. Save it and open it in VFP 5, all the code is gone!

Why? Because AddProperty is a VFP method now. Therefore VFP 6 removed this method from the RESERVED3 field. VFP 5 then won't recognize this method and delete it the next time I save the class in VFP 5. When it can delete methods from this field, why shouldn't it add them as well? This would solve not only Mark's problem, but also the problem when a new version of VFP introduces new methods. And I hope they add a lot of them in the next releases.

Otherwise all we can do in this case is rename the methods, and go through the code in all classes to find a reference to it, then change this line. Or exclusively use one version of VFP, or maintain several class libraries for every version.

Christof
--
Christof
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform