Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Define a Read-Only Property?
Message
 
 
À
21/07/2007 22:08:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
01242584
Message ID:
01242592
Vues:
13
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--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform