Re: Curious about method handling

Artem Gr <[email protected]> Fri, 05 Aug 2005 21:55:05 +0400
Newsgroups gmane.comp.lang.nice.general
Message-ID <[email protected]>
> Maybe I'm missing the point of the original question, or maybe you're
> missing the point of the original question ;-)
> 
> For a function, we can both refer to the function and refer to the
> result of the function:
> f
> f()
> 
> I think the original questioner wanted to have those same two kinds of
> reference but for an object method:
> new A().g
> new A().g()

The question was:

"Also, is there any way of passing a class method as an argument without
wrapping it in an anonymous method?"

To wich the (not tested) example is:

// Pass the A.g class method to the repeater.
repeatOnA( new A(), g );


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf