Hi!
These methods are built to use them in the builders for classes in Design time only. Never use them in the classes logic. If you want dynamic property getting/setting, do following:
I you have property name in a variable:
lcPropName = "SomeProp"
Than you can read it using, for example,
eval("thisform.MyContainer.MyObject." + m.lcPropName)
And write it using
thisform.MyContainer.MyObject.&lcPropName = lcValue
or, if MyObject supports the AddProperty method,
thisform.MyContainer.MyObject.AddProperty(lcPropName,lcValue)
(AddProperty, if property exists, just change its value).
HTH.
>Hi
>
>I've tried using read and write expression in classes but have found that once started I'm committed to using them even within the logic of the class. I just wanted to use READ for external calls rather than having write my own, or have individual getProp methods for each property.
>
>I'd be interested to know if others use these methods, why etc.
>
>Sarah
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.