[Ironruby-core] .Net Events in IR

thibaut.barrere at gmail.com thibaut.barrere at gmail.com
Sat Jul 11 11:36:31 EDT 2009


Quite similarly you can send a Proc as the event value:

http://github.com/thbar/magic/blob/fd51bcd6f4c713fdb8b4bbb60b1c18ca84804c3a/lib/magic/instance_creator.rb#L50

Hth,

-- Thibaut

Le 11 juil. 2009 à 17:17, Shay Friedman <lists at ruby-forum.com> a  
écrit :

> Hi there,
>
> I know that I can register and handle .Net events in IronRuby in the
> following way:
> klass.some_event { |sender, args| puts "Hello!" }
>
> Is this the only way of doing so or are there more ways?
>
> Thanks!
> Shay.
> ----------------------------
> Shay Friedman
> http://www.ironshay.com
> Follow me: http://twitter.com/ironshay
> -- 
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Ironruby-core mailing list
> Ironruby-core at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core


More information about the Ironruby-core mailing list