Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Protected and Public
Message
De
01/06/1999 06:40:34
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00224370
Message ID:
00224836
Vues:
13
>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
Fil
Voir

Click here to load this message in the networking platform