Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Newobject()
Message
De
24/12/1998 15:56:39
Eric Barnett
Barnett Solutions Group, Inc
Sonoma, Californie, États-Unis
 
 
À
24/12/1998 15:16:18
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Divers
Thread ID:
00169346
Message ID:
00170391
Vues:
27
One more AddProperty gotcha - it doesnt work with COM objects. If you add a property to a COM object it will exist internal to the object but will not be accessible over the COM layer. I was all gung-ho about using AddProperty to do some interesting stuff until I found this out...

>>>>No question. The lack of these function always drove me nuts. They both just seemed so obvious.
>>>Josh and John,
>>>
>>>Just be careful that AddProperty is not hidng a poor design on you.
>>
>>Jim,
>>
>>That's a good point. I'd hate to see people using it to tack additional properties to instantiated objects instead of subclassing or modifying the existing hierarchy. I can imagine trying to debug an application and finding references to properties that aren't in the class definition all over the place.
>
>It brings another nuisance - along with "where in the code does this get initialized", we are getting additional "where in the code does this property get invented".
>
>IMO, the .AddProperty should be used sparingly.
Eric Shaneson
Cutting Edge Consulting
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform