[fpc-pascal] Class procedure assigned to object's event

Micha Nelissen micha at neli.hopto.org
Wed May 27 22:36:40 CEST 2009


Antonio Sanguigni wrote:
> For the second one:
> main.pas(261,19) Error: Incompatible types: got "<class method type of
> procedure(TObject, Boolean,const AnsiString) of object;Register>"
> expected "<procedure variable type of procedure(TObject, Boolean,const
> AnsiString) of object;Register>"

Remove the 'class' keyword from your function. A class method is a 
different beast (with different signature) from a regular method.

Micha



More information about the fpc-pascal mailing list