[Ironruby-core] delegate

Kim Byung seok lists at ruby-forum.com
Sun Feb 3 20:18:20 EST 2008


Michael Letterle wrote:
> 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:
>> --
>> 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]
> http://michaeldotnet.blogspot.com

^^;

The use is necessary because this code

System::ThreadPool.QueueUserWorItem and
System::Windows::Threading::Dispatcher.BeginInvoke

Above two cords total delegate connection necessary
so i wan't directly delegate

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


More information about the Ironruby-core mailing list