[Lazarus] Add a MenuItem to a menu dynamically - OnClick: wrong number parameters

2015-03-11 Thread Binho Biatheski
Hello, Wrong number parameters specified for call to MyPopup This example works in Delphi but not in Lazarus, what are parameters ? procedure TForm1.Button1Click(Sender: TObject); var MyItem,MySubItem1: TMenuItem; Num: Integer; begin Inc(Num); MyItem:=TMenuItem.Create(Self);

Re: [Lazarus] Add a MenuItem to a menu dynamically - OnClick: wrong number parameters

2015-03-11 Thread Binho Biatheski
Thank you !!! 2015-03-11 13:39 GMT-03:00 Felipe Monteiro de Carvalho felipemonteiro.carva...@gmail.com: Add @ to procedure names: MyItem.OnClick:=@MyPopUp; MySubItem1.OnClick:=@MyPopUp; -- Felipe Monteiro de Carvalho -- ___ Lazarus