Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Define a Read-Only Property?
Message
From
21/07/2007 22:08:39
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Define a Read-Only Property?
Miscellaneous
Thread ID:
01242584
Message ID:
01242584
Views:
57
How would one define a class property that is readable from outside the class but is restricted to read-only?

I have made the property public and just applied a cProperty_Assign method with…
ERROR 1743, This.Name + ".cProperty"

This does allow one to read the property from outside the class and disallows changes, but it prevents changes from within the class as well. I am also wondering if there is a way to define the property so that:
SYS(1269, oObjectName, "cProperty", 1)
would return .T.

Any suggestions?
Thank you,
- Frank
Next
Reply
Map
View

Click here to load this message in the networking platform