Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Define a Read-Only Property?
Message
 
 
To
21/07/2007 22:08:39
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
01242584
Message ID:
01242592
Views:
12
This message has been marked as the solution to the initial question of the thread.
Take a look AT Re: Q: read-only property, the shortest implementation? Thread #927230 for relevant discussion.


>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.
>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform