I would like to access the next property using RTTI
MyComponent1.Property['variable'].SubProperty
I would like something like this:
var Ctx: TRttiContext; Typ: TRttiType; SubTyp: TRttiType; Prop: TRttiProperty; SubProp: TRttiProperty; begin Ctx:= TRttiContext.Create; Typ:= Ctx.GetType(MyComponent1.ClassInfo); Prop:= Typ.GetProperty('Property['variable'].Subproperty') //not possible Prop.SetValue(MyComponent1.Property['variable'],'500'); end;
Basically I want to access the subtask of my component, and I only have strings, so I cannot use Typ:=Ctx.GetType(MyComponent1.ClassInfo) and then Prop:=Typ.GetProperty('Property['variable'].Subproperty') this is not valid. Attention is that for the first property there is parasection. I assume that I need to get this first property, and then somehow the second property, because I can not use this property1 "." Property2
Does anyone know how to do this?
source share