I am using Firemonkey and I would like to allocate the OnTap Event to an object at Runtime.
The code that i have tries is basically the same as the one i use for the OnClick event:
Header at the top :
procedure txtHostClick(Sender: TObject);
Procedure :
procedure TMyForm.txtHostClick(Sender: TObject);
begin
//do stuff
end;
Assignment to event handler:
hotspot := Tmemo.Create(Highlight_Scrollbox);
hotspot.OnClick := txtHostClick;
So i try to apply the same logic to the OnTap event and it gives the following error :
[DCC Error] s3.pas(4338): E2009 Incompatible types: 'Parameter lists differ'
Below is a code sample of what I have tried:
Header at the top :
procedure txtOnTAPEvent(Sender: TObject; const [Ref] Point: TPointF);
Procedure :
procedure TMyForm.txtOnTAPEvent(Sender: TObject; const [Ref] Point: TPointF);
begin
//do stuff
end;
Assignment to event handler:
hotspot := Tmemo.Create(Highlight_Scrollbox);
hotspot.OnTap := txtOnTAPEvent;
There is gap in my knowledge that needs to be filled.