FireMonkey Getting FMXObjects at Run Time Using RTTI

I am trying to get (using RTTI) the ones formsthat are in my application in order to create them in runtimeform-based Name.

I declared a {$TYPEINFO ON}compiler directive and I encoded:

 lRttiType := pRttiContext.FindType ('Forms.tForm');

but I get the result nil.

'Forms.tForm'should be in shape Name?

Any help would be appreciated.

+4
source share
1 answer

As the documentation reports :

TRttiContext.FindType, , . : , (, Classes.TStrings).

QualifiedName TForm Firemonkey : FMX.Forms.TForm

, QualifiedName .

lRttiType := pRttiContext.FindType ('FMX.Forms.TForm'); // this finds the TRttiType
lRttiType := pRttiContext.FindType ('fmx.forms.TForm'); // this will return nil

, FMX.Forms.TForm TPersistent, {$M+}, {$TYPEINFO ON}. , TForm RTTI

+2

Source: https://habr.com/ru/post/1658629/


All Articles