[fpc-devel] Delphi anonymous methods

ListMember listmember at letterboxes.org
Sat Mar 2 21:25:31 CET 2013


On 2013-03-02 21:55, Sven Barth wrote:
> - (in context with the above point) couple the support for the 
> anonymous functions to a new modeswitch (enabled by default in mode 
> delphi), but allow "reference to" procvars in non-Delphi modes (this 
> way you'd only be able to use nested functions, but later on the 
> shorter syntax should be used there as well)

This paragraph went way over my head.

But, it sort of reminded me to ask about something else:

Are anonymous methods (going to be) compatible with event methods?

i.e. are they 'procedure of object' (or 'function of object') kind of 
constructs.

The reason I am asking this is: There have been times when I could kill 
to be able to assign (temporarily) a local procedure/function an 
object's event (say, OnClick) so that I could capture the event's 
outcome right in there wthin the body of the active routine.

Would this be possible?



More information about the fpc-devel mailing list