#1 2021-08-17 18:44:24

tbo
Member
Registered: 2015-04-20
Posts: 339

Equivalent function TypInfo.GetPropValue()

Is there an equivalent function TypInfo.GetPropValue() in mORMot2?

function GetPropValue(Instance: TObject; PropInfo: PPropInfo; PreferStrings: Boolean): Variant;

With best regards
Thomas

Offline

#2 2021-08-18 06:33:03

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,346
Website

Re: Equivalent function TypInfo.GetPropValue()

I don't see any benefit of using mormot.core.rtti.pas for this. Why not just use TypInfo? If you want to get a variant, just use this function.

There are several ways of getting a property value using mORMot 2 RTTI, but it depends on what you want to achieve, and your context.

Online

#3 2021-08-18 09:34:44

tbo
Member
Registered: 2015-04-20
Posts: 339

Re: Equivalent function TypInfo.GetPropValue()

Arnaud thanks for the reply. I have changed yesterday parts in my frameworks to the mORMot 2 RTTI . The GetPropValue() function was left over and I didn't know if I had missed something. I can live with GetPropValue() forever.

With best regards
Thomas

Offline

Board footer

Powered by FluxBB