Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Protected Method or property
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00752503
Message ID:
00752529
Vues:
9
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform