Jonas Maebe wrote:
But when it was changed (if any)

I port all my source to FPC (it compile in both Delphi and FPC)
in many places I use  {$IFDEF [EMAIL PROTECTED]
and now all must be deleted or I don't know something


Darek


On Dec 18, 2004, at 21:01, Dariusz Mazur wrote:

procedure tForm1.onnn(var onc : tNotifyEvent);
begin
 onclick:={$IFDEF [EMAIL PROTECTED];
end;

compiler claim:
Error: incompatible types: got "Pointer" expected "<procedure variable type of procedure(TObject) of object; Register>"


This error message looks correct (at least if you are compiling in fpc or objfpc mode). onc is a procedure variiable, so @onc is the address of the procedure variable. You should simply do "onclick := onc", or possibly even

onclick := {$ifndef [EMAIL PROTECTED]; (since Delphi requires an @ to get the contents of a procvar)

(at least if both onclick and onc are of type tnotifyevent and if tnotifyevent is a procvar type).

when I try
onclick:={$IFDEF [EMAIL PROTECTED];


In this case, the right hand side of the expression is a method, so you indeed need @ in FPC mode to get its address.


Jonas


_______________________________________________ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal




_______________________________________________
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to