[Ironruby-core] .Net Events in IR

Jim Deville jdeville at microsoft.com
Sat Jul 11 14:36:31 EDT 2009


These and any future changes will be in the specs at Merlin/Main/Languages/Ruby/Tests/Interop/net/events

Sent from my Windows® phone. build 21215.5.0.0

-----Original Message-----
From: thibaut.barrere at gmail.com <thibaut.barrere at gmail.com>
Sent: Saturday, July 11, 2009 10:39 AM
To: ironruby-core at rubyforge.org <ironruby-core at rubyforge.org>
Cc: ironruby-core at rubyforge.org <ironruby-core at rubyforge.org>
Subject: Re: [Ironruby-core] .Net Events in IR


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
_______________________________________________
Ironruby-core mailing list
Ironruby-core at rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core


More information about the Ironruby-core mailing list