[fpc-devel] What is the meaning of this error Message ?

Vincent Snijders vsnijders at quicknet.nl
Fri Jun 30 20:51:22 CEST 2006


ik wrote:
> Hi,
> 
> I'm trying to translate the following error message:
> 
> parser_e_ill_msg_param=03144_E_Message handlers can take only one call
> by ref. parameter
> % A method declared with the \var{message}-directive as message handler
> % can take only one parameter which must be declared as call by reference
> % Parameters are declared as call by reference using the 
> \var{var}-directive
> 
> And I can't seems to understand it's meaning. Can you please explain it 
> to me ?
> 

Correct:
   TTest = class
   private
     procedure CMTest(var Msg: TMessage); message CM_TEST;
   end;

Incorrect
     procedure CMTest(Msg: TMessage); message CM_TEST;
or
     procedure CMTest(var Msg: TMessage; i: integer); message CM_TEST;

etc.

The signature of a message handler is fixed.

Vincent



More information about the fpc-devel mailing list