Hi, i wonder why the declaration of the comparing function of list objects is the way it is:
TListSortCompare = function (Item1, Item2: Pointer): Integer; Since I am writing a class that sorts a list it owns depending on another property naming the property of the list items for sorting, I would like to have it made a "procedure of object": TListSortCompare = function (Item1, Item2: Pointer): Integer of object; I'm dealing with lists of files and directories that should get sorted by name, date, ... If the comparing function is a plain non object function I have to make some sort of unit global variable or the like for telling it, what property is the sort criteria. I don't like this design, although in this case there is only one soritng process at a time. Is this a concession imposed by Delphi compatibility? (If you can suggest a better strategy for using this stuff, please do.) TIA; Marc _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal