[Ironruby-core] Delegates (agian)
Joe Chung
lists at ruby-forum.com
Fri Oct 26 20:43:22 EDT 2007
Eric Nicholson wrote:
> I don't know if it's relevant or not, but the VB Windows Forms designer
> doesn't generate anything like this anyway. It looks like:
>
> Private Sub x_myevent() Handles x.myevent
> End Sub
>
> The compiler wires up the delegates.
Your code is syntactic sugar that generates
AddHandler Me.myevent, New EventHandler(AddressOf Me.x_myevent)
You can check this out for yourself with Reflector.
It is relevant, because here are two examples (within the same language
even) of language-specific syntax for event handling delegates. I think
it would be okay if IronRuby had Ruby-like syntax for delegates as well.
--
Posted via http://www.ruby-forum.com/.
More information about the Ironruby-core
mailing list