Hi guys!
How to create a property wich points to certain function in FPC.
In Delphi you declare it like this:
Code:
TSomeObject = class(TObject)
   type
     TSomeFunction = function (Var: Integer): Integer of object;
   private
     FSomeFunction: TSomeFunction;
   public
     property SomeFunction: TSomeFunction read FSomeFunction write FSomeFunction;
 end;
 //Globaly accesible function
 function SomeExistingFunctionInCode(Var: Integer): Integer;
And you set it like this:
Code:
SomeFunction := SomeExistingFunctionInCode;
This doesn't work in FPC/Lazarus. I get Error: Wrong number of parameters specified to call to "SomeFunction"