On Thu, 27 Jan 2011 16:06:25 +0200
Tommi Prami <[email protected]> wrote:

> Hello,
> 
> (I am using latest Daily Snapshot
> 
> I am trying to assignn eventhandler from my own class, for the form, but 
> compile(r) seems to think that I am trying to make an call to that 
> method, not assing it into the evenhandler
> 
> I have method in class declare as :
>      procedure OnInternalKeyUpEvent(Sender: TObject; var Key: Word; 
> Shift: TShiftState);
> 
> and I am trying to assign it as KeyUp event handler for the TForm:
> 
>    if Assigned(FParentForm) then
>    begin
>      FParentForm.OnKeyUp := OnInternalKeyUpEvent;

In mode objfpc:

FParentForm.OnKeyUp := @OnInternalKeyUpEvent;


>    end;
> 
> mwWin32WinCEBridge.pas(175,48) Error: Wrong number of parameters 
> specified for call to "OnInternalKeyUpEvent"
> 
> Is this a bug or do I need to do something different.
> 
> I think this works in Delphi...

See
http://wiki.lazarus.freepascal.org/Code_Conversion_Guide#Selecting_the_right_compiler_mode

Mattias

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to