Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Access and Assign vs. OOSE
Message
De
23/10/1998 17:01:09
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00149911
Message ID:
00150022
Vues:
39
Hi David ---

>Assign/Access can be thought of as owner object safety nets. You can prevent your object from being assigned invalid property values, and give them back a result that is potentially filtered. ie they ask for the value of cTopSecretPassword and the object just always replies "None of your business"
>

Oh, I know....and they also enforce the rule of an object changing it's own properties.

>Personally I HATE the thought of writing Get/Set for every darn public property. Sometimes practicallity just has to win out over OO puritism. And as long as it's the declared public interface to an object who the heck really cares if it is:
>
>? oObject.TheProperty or ? oObject.GetTheProperty() or ? oObject.Get( "TheProperty" )
>
>personally I prefer the first.
>

I agree with you 100% in practicality.....Gary also convinced me....I've just been rereading some theory books.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform