>I'm a newbie...
>
>Is it possible to add custom properties programmatically at run time, as they will be extracted from a table that is maintainable.
>
>i.e.
>DEFINE CLASS myclass of CUSTOM
> CustomProperty1 = .F.
> CustomProperty2 = .F.
>ENDDEFINE
>
>I have tried setting the properties as strings and using macro substitution but this seems to have no effect.
>
>i.e.
>m.lcString = 'CustomProperty1 = .F.'
>DEFINE CLASS myclass of CUSTOM
> &lcString
>ENDDEFINE
>
>I would be greatful for any help.
To keep things simple at the start, just define one array property. ie:
define class myclass
aMyRunTimePrps[1,1]
...
enddefine
At run time dimension your array to hold new elem and assign one column new prop name, value to second column.
In fact since props are coming from table you might even not need to define new props.
For adding props at runtime also there is addprop.fll in files section.
Cetin