Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
I never really thought much of property assign methods..
Message
De
14/07/1999 13:01:56
 
 
À
13/07/1999 19:40:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00241039
Message ID:
00241348
Vues:
18
Hey Erik.

>Everybody disagreed with me on my (apparently unpopular) stance.

Well, let my voice join those who disagree with you [g].

Here's one thing you can't do without Access and Assign methods: create a collection class that exposes its Item array and allows specifying the element index as either a number or name. Yes, you can do that with an Item method, but then you can't use code like:

oCollection.Item["my item"].SomeProperty

which means your collection doesn't behave like other common collections (ActiveX and VB, for example) do.

Also, I fail to see why you distinguish native from custom properties. If you're creating a class that other people would use, isn't it nicer to be able to hide implementation details (like custom vs. native) than making them extremely obvious by the fact some some properties can be accessed and set directly but others have to go through Set and Get methods?

Doug
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform