Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Protected and Public
Message
From
01/06/1999 06:40:34
 
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00224370
Message ID:
00224836
Views:
14
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform