>I have started down a path where I read a number of settings from an ini file, popluate them to a custom class and I need to display them in a listbox. I do not know all of the names a head of time. When I read the ini file, I create a property and populate the value. Is there a way of programmically walking through all the properties of a class.
>
>Ideas?
You can use AMEMBERS() to build an array containing of the properties of a class pretty easily; you can add properties to a class at runtime under VFP6 at least using the AddProperty() method of the class.
DIMENSION aPropsB4[1], aPropsAfter[1]
oClass = CREATEOBJ('MyClass')
? AMEMBERS(aPropsB4,oClass)
oClass.AddProperty('Xyzzy')
? AMEMBERS(aPropsAfter,oClass)
>
>One choice is to go back and just populate an array property but that seems too easy. I have to do things the hard way.