Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Protected Method or property
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00752503
Message ID:
00752529
Views:
14
>I need to add a method to a Form based class but I donot want this method to be overwriten, so I try to put the method hidden and protected too but when i try to run the method in runtime it say that "property metodname doesn't exist" what am I doing wrong?

When you PROTECT a method in your form class, only another method in that exact same form can call that method. When you create a new form that is based on that class, the method will not be accessible. The best way to do what you want is to create another PUBLIC method in your form base class. You will need THISFORM.CallMyProtectedMethod() in that method in the form base class. Then this PUBLIC method can be called. Beware, that if someone create a new form based on the form class and puts code in this PUBLIC method, they must include a DODEFAULT(). Otherwise, the method code in the PARENT will not fire.
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform