* use NameIndex in GetPropInfos

git-svn-id: trunk@2004 -
This commit is contained in:
peter 2005-12-20 10:35:08 +00:00
parent ff1f800de5
commit 6238b1a917

View File

@ -600,25 +600,24 @@ Var
TP : PPropInfo; TP : PPropInfo;
Count : Longint; Count : Longint;
begin begin
TD:=GetTypeData(TypeInfo); repeat
// Get this objects TOTAL published properties count TD:=GetTypeData(TypeInfo);
TP:=aligntoptr(PPropInfo(aligntoptr((@TD^.UnitName+Length(TD^.UnitName)+1)))); // Get this objects TOTAL published properties count
Count:=PWord(TP)^; TP:=aligntoptr(PPropInfo(aligntoptr((@TD^.UnitName+Length(TD^.UnitName)+1))));
// Now point TP to first propinfo record. Count:=PWord(TP)^;
Inc(Pointer(TP),SizeOF(Word)); // Now point TP to first propinfo record.
tp:=aligntoptr(tp); Inc(Pointer(TP),SizeOF(Word));
While Count>0 do tp:=aligntoptr(tp);
begin While Count>0 do
PropList^[0]:=TP; begin
Inc(Pointer(PropList),SizeOf(Pointer)); PropList^[TP^.NameIndex]:=TP;
// Point to TP next propinfo record. // Point to TP next propinfo record.
// Located at Name[Length(Name)+1] ! // Located at Name[Length(Name)+1] !
TP:=aligntoptr(PPropInfo(pointer(@TP^.Name)+PByte(@TP^.Name)^+1)); TP:=aligntoptr(PPropInfo(pointer(@TP^.Name)+PByte(@TP^.Name)^+1));
Dec(Count); Dec(Count);
end; end;
// recursive call for parent info. TypeInfo:=TD^.Parentinfo;
If TD^.Parentinfo<>Nil then until TypeInfo=nil;
GetPropInfos (TD^.ParentInfo,PropList);
end; end;
Procedure InsertProp (PL : PProplist;PI : PPropInfo; Count : longint); Procedure InsertProp (PL : PProplist;PI : PPropInfo; Count : longint);