Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2013-06

ask for help

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Ryszard Michoński

Hello,

I am trying to move a simple database program from Delphi to Lazarus and I have met the problem in below listed procedure which created no problems in Delphi

procedure TFormaGl.Lanos1Click(Sender: TObject);
begin
    WYDATKITytulem.AsString:='Zakupy';
    WYDATKIGrupa.AsString:='xxxx';
    WYDATKINazwaSklepu.AsString:='Orlen Mi?dzyzdroje';
    WYDATKI.Post;
    SZCZEGOLY.AfterInsert:=nil;
    if not (SZCZEGOLY.State in [dsInsert, dsEdit]) then SZCZEGOLY.Insert;
    SZCZEGOLYTowar.AsString:='Gaz Lanos';
    SZCZEGOLYJm.AsString:='l';
    SZCZEGOLYGrupa.AsString:='LanosG';
    SZCZEGOLY.AfterInsert:=SZCZEGOLYAfterInsert;
end;

During compilation I am getting info about errors

u_gl.pas(166,47) Error: Wrong number of parameters specified for call to
"SZCZEGOLYAfterInsert"
u_gl.pas(117,15) Hint: Found declaration:
TFormaGl.SZCZEGOLYAfterInsert(TDataSet);

Can I count for any hint ?

Regards

Ryszard

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130610/0d620927/attachment.html>

Reply by email

Mattias Gaertner
to Ryszard Michoński
Show quoted text 19 lines
Hello, I am trying to move a simple database program from Delphi to Lazarus and I have met the problem in below listed procedure which created no problems in Delphi procedure TFormaGl.Lanos1Click(Sender: TObject); begin WYDATKITytulem.AsString:='Zakupy'; WYDATKIGrupa.AsString:='xxxx'; WYDATKINazwaSklepu.AsString:='Orlen Mi?dzyzdroje'; WYDATKI.Post; SZCZEGOLY.AfterInsert:=nil; if not (SZCZEGOLY.State in [dsInsert, dsEdit]) then SZCZEGOLY.Insert; SZCZEGOLYTowar.AsString:='Gaz Lanos'; SZCZEGOLYJm.AsString:='l'; SZCZEGOLYGrupa.AsString:='LanosG'; SZCZEGOLY.AfterInsert:=SZCZEGOLYAfterInsert;

That is only valid in mode Delphi.
For mode ObjFPC you need

     ;
Show quoted text 10 lines
end; During compilation I am getting info about errors u_gl.pas(166,47) Error: Wrong number of parameters specified for call to "SZCZEGOLYAfterInsert" u_gl.pas(117,15) Hint: Found declaration: TFormaGl.SZCZEGOLYAfterInsert(TDataSet); Can I count for any hint ?

Mattias

Reply by email

Ryszard Michoński
to Mattias Gaertner: On Mon, 10 Jun 2013 11:03:35 +0200 That is only valid in mode Delphi. For mode ObjFPC you…

Thank you Mattias,

It was my first contact with this forum and I am suprised with so quick answer.

Regards

Ryszard

W dniu 10.06.2013 11:12, Mattias Gaertner pisze:

Show quoted text 44 lines
On Mon, 10 Jun 2013 11:03:35 +0200 "Ryszard Micho?ski" wrote: > Hello, > > I am trying to move a simple database program from Delphi to Lazarus and > I have met the problem in below listed procedure which created no > problems in Delphi > > > procedure TFormaGl.Lanos1Click(Sender: TObject); > begin > WYDATKITytulem.AsString:='Zakupy'; > WYDATKIGrupa.AsString:='xxxx'; > WYDATKINazwaSklepu.AsString:='Orlen Mi?dzyzdroje'; > WYDATKI.Post; > SZCZEGOLY.AfterInsert:=nil; > if not (SZCZEGOLY.State in [dsInsert, dsEdit]) then SZCZEGOLY.Insert; > SZCZEGOLYTowar.AsString:='Gaz Lanos'; > SZCZEGOLYJm.AsString:='l'; > SZCZEGOLYGrupa.AsString:='LanosG'; > SZCZEGOLY.AfterInsert:=SZCZEGOLYAfterInsert; That is only valid in mode Delphi. For mode ObjFPC you need ; > end; > > During compilation I am getting info about errors > > u_gl.pas(166,47) Error: Wrong number of parameters specified for call to > "SZCZEGOLYAfterInsert" > u_gl.pas(117,15) Hint: Found declaration: > TFormaGl.SZCZEGOLYAfterInsert(TDataSet); > > Can I count for any hint ? Mattias -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email