Hi all, and sorry for my English. Consider the following:
TFieldType = class
fValue: string;
end;
TMainClass = class
private
Ffield: TFieldType;
public
function GetValue: string;
end;
In TMainClass.GetValue I'm tryin get values of TMainClass fields:
function TMainClass.GetValue;
begin
vCtx := TRTTIContext.Create;
vType := vCtx.GetType(Self.ClassInfo);
for vField in vType.GetFields do
vField.GetValue(
//Here's the trouble, because i don't know how to get the instance
);
May be there are another ways of getting values of fields which are the instances of another classes?