Hi,

Maybe Im tierd but could any one tell me what this code wont work:
> program Project1;
>
> {$mode objfpc}{$H+}
>
> uses  Classes,  SysUtils;
>
> type
>
> { Tbook }
>
> Tbook = class  private    fnoti: TNotifyEvent;  public    property
> noti: TNotifyEvent read fnoti write fnoti;  end;
>
> var  b: Tbook;
>
> procedure notievent(Sender: TObject);  begin    WriteLn('test');  end;
>
> begin  b := Tbook.Create;  b.noti := @notievent; //ERROR       b.Free;
>
and give this error:
> project1.lpr(30,13) Error: Incompatible types: got "<address of
> procedure(TObject);Register>" expected "<procedure variable type of
> procedure(TObject) of object;Register>"

Regards, Ara

-- 
http://www.fastmail.com - Or how I learned to stop worrying and
                          love email again

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to