Sorry... I just looked at the source code and events are indeed not implemented yet. I promised Tomas I'd try really really hard to finish the typegen code this month, so you shouldn't have to wait too long.
From: ironruby-core-boun...@rubyforge.org [mailto:ironruby-core-boun...@rubyforge.org] On Behalf Of Mark Ryall Sent: Monday, May 04, 2009 6:46 AM To: ironruby-core@rubyforge.org Subject: Re: [Ironruby-core] clr events in ruby No dice i'm afraid: with 'add_my_event': Snippets.scripting:0:in `add_MyEvent': undefined method `add_MyEvent' for IronRuby.Classes.Object$5:ClassWithEvent (NoMethodError) from ClassLibrary:0:in `RegisterEvent' from experiment1.rb:90 with 'add_MyEvent': Snippets.scripting:0:in `add_MyEvent': The method or operation is not implemented. (System::NotImplementedException) from ClassLibrary:0:in `RegisterEvent' from experiment1.rb:90 On Mon, May 4, 2009 at 11:25 PM, Curt Hagenlocher <cu...@microsoft.com<mailto:cu...@microsoft.com>> wrote: I believe that this should work, but the name would need to be Rubified as "add_my_event". From: ironruby-core-boun...@rubyforge.org<mailto:ironruby-core-boun...@rubyforge.org> [mailto:ironruby-core-boun...@rubyforge.org<mailto:ironruby-core-boun...@rubyforge.org>] On Behalf Of Mark Ryall Sent: Monday, May 04, 2009 6:02 AM To: ironruby-core@rubyforge.org<mailto:ironruby-core@rubyforge.org> Subject: [Ironruby-core] clr events in ruby Hi everyone, I'm messing around with trying to create ironruby mock (actually recorder) implementations of various sorts of CLR type features and am struggling with events. Is it currently possible to create an implementation of a CLR interface that contains an event? For example using System; namespace ClassLibrary { public interface IHaveAnEvent { event EventHandler MyEvent; } } ... class ClassWithEvent include ClassLibrary::IHaveAnEvent def initialize @blocks = [] end def add_MyEvent ???? or something ???? end end Is this possible or not yet available? _______________________________________________ Ironruby-core mailing list Ironruby-core@rubyforge.org<mailto:Ironruby-core@rubyforge.org> http://rubyforge.org/mailman/listinfo/ironruby-core
_______________________________________________ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core