Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing array property of an object
Message
 
To
05/04/1999 08:00:22
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00204115
Message ID:
00205186
Views:
17
Bill,

Ok, here are the definitions again for everyone who may not have seen them before.

Property scoping:

Public: Seen and available to the class, all of tis subclasses, and all objects.

Protected: Available only to the object that contains the property

Hidden: Available and visible to only the class that had the property added to it.

Purpose

Public: For most properties. These are the properties that can be manipulated by other objects at run time. All of the default properties of teh VFP base classes are originally public in scope.

Protected: Use this csoping to prevent any other object from changing or reading a property directly. Only the object with the property can read or write to that property, any other object will get a variable not found error.

Hidden: These properties only show up for the class that ahd them added. They are not listed in the property sheet for the subclasses and/or objects created from the class.

An example: I need to provide a place to hold a value that a class is using internally. I don't want a developer to be able to change that value when subclassing. I make that property Hidden to my class. Then the developer can't see the property in the class designer when subclassing and only the code in my class definition can address that property.

Protected: I add a property to my class that should only be altered or read by calling a method of my class. I mark the property protected, thereby preventing any other object from accessing that property except by calling a method of my object.

The same scopes can be applied to methods. You could use hidden to cause access and assign methods to become invisible to the developer when subclassing.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform