Information générale
Catégorie:
Programmation Orientée Object
>Vlad,
>
>Just to clarify for all the lurkers.
>
>The three visiblities of properties and methods are Public (default), Protected, and Hidden.
>
>Public properties and emthods are visible and addressable by all objects at runtime and all subclasses of a class.
>
>Protected affects only the instance at runtime, the protected properties and methods are not addressable by any object other than the one that owns them.
>
>Hidden properties and methods are only visible to the class in which they were created. They are unavailable to all subclasses and instances.
Actually Hidden PEMs are available to instances of the class they were declared in (otherwise they wouldn't be very useful - they are not available to subclases
Protected PEMs are available to the class and all derived classes (sub-classes)
and public PEMs have no restrictions on access
VFP6 also adds a hybrid beween public and protected properties - with the Access and Assign methods
Arnon
Précédent
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