<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div>Hi,<br></div>
<div> </div>
<div>Maybe Im tierd but could any one tell me what this code wont work:<br></div>
<blockquote><div>program Project1;<br></div>
<div> </div>
<div>{$mode objfpc}{$H+}<br></div>
<div> </div>
<div>uses<br></div>
<div> Classes,<br></div>
<div> SysUtils;<br></div>
<div> </div>
<div>type<br></div>
<div> </div>
<div> { Tbook }<br></div>
<div> </div>
<div> Tbook = class<br></div>
<div> private<br></div>
<div> fnoti: TNotifyEvent;<br></div>
<div> public<br></div>
<div> property noti: TNotifyEvent read fnoti write fnoti;<br></div>
<div> end;<br></div>
<div> </div>
<div>var<br></div>
<div> b: Tbook;<br></div>
<div> </div>
<div> procedure notievent(Sender: TObject);<br></div>
<div> begin<br></div>
<div> WriteLn('test');<br></div>
<div> end;<br></div>
<div> </div>
<div>begin<br></div>
<div> b := Tbook.Create;<br></div>
<div> b.noti := @notievent; //ERROR<br></div>
<div> b.Free; <br></div>
<div> </div>
</blockquote><div id="sig12586409"><div class="signature"> and give this error:<br></div>
</div>
<blockquote><div id="sig12586409"><div class="signature">project1.lpr(30,13) Error: Incompatible types: got "<address of procedure(TObject);Register>" expected "<procedure variable type of procedure(TObject) of object;Register>"<br></div>
</div>
</blockquote><div id="sig12586409"><div class="signature"> </div>
<div class="signature">Regards,<br></div>
<div class="signature">Ara<br></div>
</div>
<div> </div>
<pre>
--
http://www.fastmail.com - Or how I learned to stop worrying and
love email again
</pre>
</body>
</html>