// Drop the TMyClass.

function Compare( Item1, Item2 : Pointer ) : Longint;
begin
   case fIndex of
      0:  Result := some compare of Item1, Item2;// These compares are
implemented in an object from another unit
      1:  Result := another compare of Item1, Item2
   end;
end;

Sort takes a function, not a method. There is a difference. A function
pointer is, well one pointer. A method pointer (function/procedure of
object) is tow pointers 1st pointer) for the function 2nd pointer) for the
object instance
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to