[fpc-pascal] Usage of FieldAddress
Sven Barth
pascaldragon at googlemail.com
Sun Apr 4 20:10:50 CEST 2021
Am 04.04.2021 um 19:12 schrieb Ryan Joseph via fpc-pascal:
> I'm trying to see fields by name but TObject.FieldAddress doesn't seem to be working. Do I have that correct I should be using FieldAddress to return the pointer of the published property? Some how I can't seem to find an example of FieldAddress on Google....
>
> type
> TSomething = class(TPersistent)
> private
> m_scale: integer;
> published
> property scale: integer read m_scale write m_scale;
> end;
FieldAddress only works on published fields. Just like MethodAddress
only works on published methods.
For private fields extended RTTI is required which is not yet implemented.
Regards,
Sven
More information about the fpc-pascal
mailing list