L505 wrote:
@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);



Thanks for the detail. I find it really hard to get my head around OOP. It just seems to put barriers in the way of what I want to do. Can you think of any reason why it would want or need a procedure in this form?

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

Reply via email to