Hi all,
Is there any way to get / set a property value using a string identifier?
Something like:
instead of:
The point is that all properties are inserted into a TStringGrid which one column is dedicated to the property name. Using this column, I would like to set directly new values into my object (MyClass). Actually there's a bunch of [if else if] to check each property names but I don't like it.
Thanks a lot in advance,
RC
Is there any way to get / set a property value using a string identifier?
Something like:
Code:
oMyClass.Properties('CalcValueX') := x;
x := oMyClass.Properties('CalcValueX');
Code:
oMyClass.CalcValueX := x;
x := oMyClass.CalcValueX;
The point is that all properties are inserted into a TStringGrid which one column is dedicated to the property name. Using this column, I would like to set directly new values into my object (MyClass). Actually there's a bunch of [if else if] to check each property names but I don't like it.
Thanks a lot in advance,
RC