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

Click here to load this message in the networking platform