[Ironruby-core] Form Designer adding delegates

Dermot Hogan lists at ruby-forum.com
Thu Oct 25 12:07:38 EDT 2007


Tomas Matousek wrote:
> 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.
> 
> Tomas

This looks reasonably promising in the short term. I'll try implementing 
this in Ruby. All I need is some syntax that won't be rejected by 
IronRuby and that hooks up a delegate type thing to the object.

The FormDesigner doesn't care if it's '+=' or '<<'

Dermot
-- 
Posted via http://www.ruby-forum.com/.


More information about the Ironruby-core mailing list