Hi
how would I get a structure of a specific record type in runtime?
Let say I have a record
Type TRec = record
ID:integer;
Name:string;
Gender:char;
Active:boolean;
end;
var Clients:array of TRec;
How would I get a name, type and data of each element/attribute of Clients?
For example I would to do something like this:
for i:=0 to Clients.NoOfElements-1 do
begin
vName:=GetElementName(Clients,i);
vType:=GetElementType(Clients,i);
vData:=GetElementData(Clients,i);
...
end;
Google show some examples of using RTTI functions, like GetPropList, GetPropName... but these are all used for classes and their published properties, if I understand correctly.
What about array... is it possible?
Thanx a lot
Tilen
how would I get a structure of a specific record type in runtime?
Let say I have a record
Type TRec = record
ID:integer;
Name:string;
Gender:char;
Active:boolean;
end;
var Clients:array of TRec;
How would I get a name, type and data of each element/attribute of Clients?
For example I would to do something like this:
for i:=0 to Clients.NoOfElements-1 do
begin
vName:=GetElementName(Clients,i);
vType:=GetElementType(Clients,i);
vData:=GetElementData(Clients,i);
...
end;
Google show some examples of using RTTI functions, like GetPropList, GetPropName... but these are all used for classes and their published properties, if I understand correctly.
What about array... is it possible?
Thanx a lot
Tilen