[Ironruby-core] delegate

Michael Letterle michael.letterle at gmail.com
Sun Feb 3 13:21:20 EST 2008

I don't think you'd generally want to be initializing an event handler
like that, normally you just want to respond to an event. For
instance, let's say you have a System::Windows::Forms::Button called
rbutton, you would do something like the following:

rbutton.Click { |sender,e| puts "Clicked!"}

Why do you feel the need to new up an EventHandler directly?

On Feb 3, 2008 12:12 PM, Kim Byung seok <lists at ruby-forum.com> wrote:
> Hellow
> I worte code this code
> d = System::EventHandler.new { |sender,e| puts "1" }
> i run code dispay this error
> wrong number or type of arguments for `System::EventHandler'
> (ArgumentError)
> The delegate to inform a direction for use
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Ironruby-core mailing list
> Ironruby-core at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core

Michael Letterle
[Polymath Programmer]

More information about the Ironruby-core mailing list