> > @MyEventHandle
> >
>
> Closer. Now I get this error:
>
> unit1.pas(200,69) Error: Incompatible type for arg no. 3: Got
> "<address of procedure(LongInt, LongWord);Register>", expected
> "<procedure variable type of procedure(LongInt, LongWord) of
> object;Register>"
>
>

It probably expects a method which must be part of a class

TSomeClass = class
  procedure Method1;
end;

var
  SomeClass1: TSomeClass;

begin
  SomeClass1.create;
  // @SomeClass.Method1; <--- use this
  SomeClass1.free;
end.


This happens when it expects "procedure of object" as opposed to a plain 
procedure or
function not *of* an object.

It is probably expecting this:
  TObjectProc = procedure(something: tsome) of object;
versus a regular method:
  TRegularProc = procedure(something: tsome);



_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to