Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Protected & Hidden Properties
Message
From
23/08/1998 11:53:41
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Protected & Hidden Properties
Miscellaneous
Thread ID:
00129133
Message ID:
00129133
Views:
59
I am confused about custom properties of classes.

In a class I tried out, I have these two properties that I do NOT want the user to change - oldleft and oldtop. I can make them PROTECTED and then the user cannot change them. But when I try to access them outside the PARENT eg if I have a cmdButton on the form and need to access these properties from its CLICK Method -

THIS.PARENT.oldtop = 10

I get the error that the property was not found.

If I create a custom method for the class then I can access this protected property from it

THIS.oldtop = 10 is OK!

How do I get to these properties (PROTECTED) from methods whithin other members of the same class??

I can find no sample code to help me here.

So THIS.CustomProtectedProperty is OK but

THIS.PARENT.CustomProtectedProperty gives error property not found.
The same with HIDDEN. I can only acces these properties if I make them PUBLIC which defeats the purpose.

Can someone help as it is driving me crazy.

Bernard
boutb@powerup.com.au
Next
Reply
Map
View

Click here to load this message in the networking platform