Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Access / Assign and AddProperty methods
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00170142
Message ID:
00170149
Views:
18
Hi Silvio,

>>As for AddProperty, other than using it for creating public vars while my oo >>conscience is blackmailed into silence, I still have to find how to use it. >>It seems to me that if I need to add an undocumented property at runtime I am >>>already into the patching part of our job. If a property is that important, >>I should have added it from the beginning, otherwise, if it's needed because >>the original specs for the program have changed, it certainly warrants >>documenting.

My take on the usefulness of Addproperty comes in the idea of generic data handlers. If you want to write adaptive front end and middleware components you need something like an addproperty method. Before 6.0 the only way to do this was with SCATTER NAME which would create properties on the fly. When we developed our first set of data aware classes we found that it would be a pain from a pure OOP standpoint to have to change classes and recompile our app every time we wanted to make a schema change. What we did to alleviate this problem was to create a generic data controller that presented a set of properties from a table. Whenever the database was changed so went the data controller.

Anyway, this is where we find Addproperty useful. I am interested in hearing other people's opinions.

Rod
Rod Paddock
Editor in Chief CoDe Magazine
President Dash Point Software, Inc.
VP Red Matrix Technologies,Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform