I have a Delphi component used by an old Delphi program I want to migrate to Lazarus. I have managed to get it to compile. I don't want to install it into Lazarus, as it's a non visual component anyway and it is more easy to create and destroy it and set the properties in code.
All is OK, except that I seem to be unable to assign an event handling procedure of type TNotifyEvent.
The prcedure is defined in the component as:
property OnRxClusterEvent : TNotifyEvent read fOnRxClusterEvent write fOnRxClusterEvent;
It is defined in my form's private declarations as:
procedure SerialPortNG1RxClusterEvent(Sender: TObject);
After I create the component I have the statement:
SerialPortNG1.OnRxClusterEvent := SerialPortNG1RxClusterEvent;
I have done this many times in Delphi, but FPC reports the error "Wrong number of parameters specified." I have enabled the Delphi compatibility switch in project options.