Lazarus
Programming => LCL => Topic started by: egsuh on January 28, 2022, 08:14:59 am
-
Hi,
I love RTTI controls. I'd like to confirm following.
I assign a property name to RTTI controls during design. That is,
RTTIControl.Link.TIPropertyName := SomePropertyOfMyComponent;
And I assign its TiObject dynamically during runtime, i.e.
RTTIControl.Link.TIObject := MyComponent;
But assigning RTTIControl.Link.TIObject := nil; seems to raise exception if the TIPropertyName remains.
Is this true?
-
Changing tiobject causes problem, whether it's nil or not.
-
Can I use RTTI controls only with TComponent descendants, not with TPersistent?
-
Can I use RTTI controls only with TComponent descendants, not with TPersistent?
Well, TPersistent causes its descendants to have RTTI information, because it is compiled in {$M+} state, so in principle this should be possible for any Tpersistent derived class.. Note that the properties should be published, not public.