Information générale
Titre:
Change protected method to public in child class ?
Hi,
I'm writing a general class that has a protected function called PutData(). I have several other classes that are inherited from this general class.
In one of these subclasses I would like PutData() to be a public method. Is this possible ?
My workaround for now is to create another method for the child class, Put(), that calls PutData() of the base class. This may give me problems later, if I would change PutData() in the base class. Therefore, I'd like a better solution.
By the way, is this right ?
* Protected methods cannot be executed by the user, but can be executed in the method code of the class or it's child classes.
* Hidden methods are only accessible in the class itself.
(I'm used to C++, therefore I'm a bit confused.)
Thanks, Marc Van Riet.
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement