Zitat von "Leonardo M. Ramé" <martinr...@yahoo.com>:
How are you filling the ASortProps array? if it is by hand, you have
to take care of Case Sensitivity of property names.
You can use this function to know the published properties of any
class. Try it inside your DoCompareProps, passing
TFTPListRec(AItem1).ClassType as param, if AItem1 is an instance it
should list all its properties:
procedure GetClassProperties(AClass: TClass);
(* get published properties into a list *)
var
PropList: ppropList;
ClassTypeInfo: PTypeInfo;
I: Integer;
lProps: Integer;
begin
(* Get properties and a pointer to class *)
lProps := GetTypeData(AClass.ClassInfo)^.PropCount;
if lProps <> 0 then
begin
(* Properties list to be analyzed *)
for I := 0 to GetPropList(AClass.ClassInfo, PropList) -1 do
writeln(PropList[I]^.name);
end;
end;
This will create a mem leak. Call GetPropList only once and FreeMem
the PropList at the end.
Mattias
--
Powered by NetMail
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal