<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Sep 23, 2014 at 1:51 PM, silvioprog <span dir="ltr"><<a href="mailto:silvioprog@gmail.com" target="_blank">silvioprog@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Tue, Sep 23, 2014 at 1:53 PM, Boian Mitov <span dir="ltr"><<a href="mailto:mitov@mitov.com" target="_blank">mitov@mitov.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">
<div dir="ltr">
<div style="font-size:10pt;font-family:Arial;color:rgb(0,0,0)">
<div>It used to be compatible, however since we rewrote it to use anonymous 
methods, and attributes (And reduced the code to 1/4 of the original size in the 
process) ~2 years ago, the new versions are not any more Lazarus compatible :-( 
.</div></div></div></div></blockquote><div><br></div></span><div><div>:-(</div><div><br></div><div>Currently I'm programming a lot in Java (for Android) and jQuery (for web), and I miss the dynamic methods in Object Pascal of Free Pascal (Delphi already has, which are anonymous methods) too.</div><div><br></div><div>Nonproductive:</div><div><br></div><div><div>[snip]</div></div><div><br></div><div>Productive:<br></div><div><br></div><div><div>procedure TApp.Create(Sender: TObject);</div><div>begin</div><div>  MyButton.SetOnClick(procedure Test; begin</div><div>      Alert('Button clicked');</div><div>  end);</div><div>end;</div></div><div><br></div><div>I have a lot of ideas to be implemented in two projects (Brook, dOpf) that I maintain. But unfortunately it will take a while to release the new version of the compiler (FPC 2.8), and this prevents me from continue working to release new versions of this projects.</div><div><br></div></div></div></div></div></blockquote><div><br></div><div>Non productive sample is not quite accurate, since the event assignment is typically handled by RTTI during an .lfm loading. Though for dynamically created forms the assignment code indeed should be there.</div><div><br></div><div>About productive code. Should it look like this (note "Test" name is removed from procedure declaration)?</div><div><br></div><div><div>procedure TApp.Create(Sender: TObject);</div><div>begin</div><div>  MyButton.SetOnClick(procedure; begin</div><div>      Alert('Button clicked');</div><div>  end);</div><div>end;</div></div><div> </div><div>thanks,</div><div>Dmitry</div></div></div></div>