[fpc-pascal] Read Field names from VMT

Sven Barth pascaldragon at googlemail.com
Tue Dec 26 10:14:28 CET 2023


Amir--- via fpc-pascal <fpc-pascal at lists.freepascal.org> schrieb am Di.,
26. Dez. 2023, 07:03:

> Hi,
>
>    I want to retrieve the name of the fields in a record/class, at run
> time. It looks like "TVmt.vFieldTable" is what I need. But I cannot find
> any documentation about how to explore the content of this table. I
> appreciate any pointer.
>

This only works for published fields and only fields of type class or
interface can be published.

Anything more requires extended RTTI, which is not yet implemented in FPC
(it's already more or less ready in a merge request, but there's still the
one or other issue that needs to be addressed).

Regards,
Sven

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20231226/b2853ce1/attachment.htm>


More information about the fpc-pascal mailing list