On Sat, Jan 26, 2013 at 4:57 PM, Sven Barth <pascaldra...@googlemail.com> wrote:
> On 26.01.2013 15:52, Alexander Klenin wrote:
>>
>> On Sun, Jan 27, 2013 at 12:26 AM, Paul Ishenin <paul.ishe...@gmail.com>
>> wrote:
>>>
>>> 26.01.13, 6:57, Alexander Klenin пишет:
>>>
>>> Why to invent a new solution if Delphi already have one:
>>>
>>> http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/devcommon/anonymousmethods_xml.html
>>>
>>
>> Of course, the Delphi-compatible implementation is a basis --
>> I did not even mention it, because I thought it is obvious.
>> (Although I would still like to devise some solution for using
>> closures for events --
>> "IDE does not recognize them" seems quite a weak obstacle to me).
>>
>
> I assume this is because anonymous functions are not plain methods. Thus
> they are not compatible with TMethod (the type behind "procedure/function of
> object"). They are instead based on a different (internal) type.

Please take a look at this:
http://blog.barrkel.com/2010/01/using-anonymous-methods-in-method.html
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to