[fpc-pascal] Class procedure assigned to object's event
a.sanguigni at gmail.com
a.sanguigni at gmail.com
Tue May 26 16:03:00 CEST 2009
Hi all,
I'm working on a code I have found on internet about a little ftp client using synapse. This code:
class procedure callback.StatusCMD(Sender: TObject; Response: Boolean;
const Value: string);
defines a class procedure that in delphi mode assigned to:
if cbOnStatusCMD.Checked then
FTP.OnStatus:=callback.StatusCMD
else
FTP.OnStatus:=nil;
compile fine.
But if I set {$mode objfpc} rather than delphi I got:
main.pas(262,3) Error: Wrong number of parameters specified for call to "StatusCMD"
I think because synapse source has delphi mode on.
The following is the type of OnStatus event:
TFTPStatus = procedure(Sender: TObject; Response: Boolean;
const Value: string) of object;
Is there a way to compile with objfpc or better which is the difference between two modes for this case ?
Thanks
Antonio
--
Antonio Sanguigni alias slapshot
----------------------------------------------------------------------
GioveLUG (Linux User Group) - http://www.giovelug.org
Edupup (Educational distro) - http://www.pieroni.biz/edupup
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 270 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20090526/c80f5851/attachment.sig>
More information about the fpc-pascal
mailing list