[Ironruby-core] Form Designer adding delegates

John Lam (DLR) jflam at microsoft.com
Wed Oct 24 23:53:13 EDT 2007

Tomas Matousek:

> Actually, Ruby already has an in-place addition operator for arrays:
> <<.
> So another way of hooking could be:
> form.click << method(:bar)
> We can alias/rename :add to :push and :remove to :delete for better
> consistency with Ruby Array class method names.
> Of course, we can provide all three ways and let the user choose
> whatever she likes.

For consistency, we should also let the user remove delegates as well via -=. But other than that, it looks good and feels rather Rubyish.


More information about the Ironruby-core mailing list