[Lazarus] SqLite
SteveG
steveg at nevets.com.au
Mon Jul 13 15:24:10 CEST 2009
Thx!
2009/7/10 Mattias Gaertner <nc-gaertnma at netcologne.de>
> On Fri, 10 Jul 2009 12:38:09 +0800
> 闫程远 <yanchengyuan at gmail.com> wrote:
>
> > well, that worked. thanks.
> > but there's still a problem:
> > when i tried to assign a method to the OnProgress property, i got a
> > error message:
> >
> > UCryptForm.pas(100,37) Error: Wrong number of parameters specified
> > for call to "CsOnprogress"
> > UCryptForm.pas(59,22) Hint: Found declaration:
> > TCryptForm.CsOnprogress(TObject);
> > UCryptForm.pas(193, stopping
> >
> >
> > the method was declared and implemented as follow:
> >
> > TCryptForm = class(TForm)
> > //... other declarations
> > procedure CsOnprogress(Sender:TObject);
> > private
> > { Private declarations }
> > public
> > { Public declarations }
> > end;
> >
> > procedure TCryptForm.CsOnProgress(Sender:TObject);
> > begin
> > pb.Position:=Integer(TCompressionStream(Sender).Position div 1024);
> > Application.ProcessMessages;
> > end;
> >
> > and i assigned the method in this way:
> > cs.onProgress:=Self.CsOnprogress;
> >
> > why does this get CE?
>
> I mode objfpc you must assign the address to the procedure:
>
> cs.onProgress:=@Self.CsOnprogress;
>
>
> >[...lots of old rubbish...]
>
>
> Mattias
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
--
Regards,
Yan Chengyuan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20090710/9d17b1eb/attachment-0004.html>
More information about the Lazarus
mailing list