Re: [Ironruby-core] Calling a C# static from IronRuby

2009-11-19 Thread Ivan Porto Carrero
FWIW I read too quickly before I sent the mail previous to this one. Orion put me straight, I have no objections to this and will put it in the interop features box. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.i

Re: [Ironruby-core] Calling a C# static from IronRuby

2009-11-17 Thread Ryan Riley
I thought '.' was for instance and '::' for static members. I need to brush up on my Ruby! :) Ryan Riley Email: ryan.ri...@panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Website: http://panesofglass.org/ On Tue, Nov 17, 2009 at 11:29 AM, Ivan P

Re: [Ironruby-core] Calling a C# static from IronRuby

2009-11-17 Thread Ivan Porto Carrero
both work :: but in practice you see . more often though (it should also be SomeClass::new if we're going down that route :)) http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/82031?help-en http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/250948 http://blade.nagaokaut.ac.jp/cg

Re: [Ironruby-core] Calling a C# static from IronRuby

2009-11-17 Thread Ryan Riley
On Fri, Nov 13, 2009 at 1:06 PM, Shay Friedman wrote: > I guess you can do that in two ways. > > The first one is to add a statement in Ruby code: > > class Object > def mymethod(str) > MyCSharpClass.mymethod(str) > end > end > > Maybe I'm missing something, but shouldn't that be: def m

Re: [Ironruby-core] Calling a C# static from IronRuby

2009-11-13 Thread Jimmy Schementi
> From: ironruby-core-boun...@rubyforge.org [mailto:ironruby-core- > boun...@rubyforge.org] On Behalf Of Alexandre Mutel > Sent: Friday, November 13, 2009 1:45 PM > To: ironruby-core@rubyforge.org > Subject: Re: [Ironruby-core] Calling a C# static from IronRuby > > >

Re: [Ironruby-core] Calling a C# static from IronRuby

2009-11-13 Thread Orion Edwards
On Fri, Nov 13, 2009 at 9:07 PM, Jimmy Schementi > wrote: FYI, we’re thinking about allowing you to use “include” with .NET types, which will include it’s static methods. That would enable: I'd be very much in favour of this. A .NET static class full of static methods always seemed like it

Re: [Ironruby-core] Calling a C# static from IronRuby

2009-11-13 Thread Alexandre Mutel
> On a similar subject, is there a way to resolve dynamic variable at > runtime? Like, a user type a variable that was not declared, but the DLR > host is able to create on the fly an object for this variable and return > it. Is it possible? Is "IDynamicMetaObjectProvider" and > "IAttributesCol

Re: [Ironruby-core] Calling a C# static from IronRuby

2009-11-13 Thread Alexandre Mutel
Ivan Porto carrero wrote: > You can only reach it by adding the class as receiver. > > but you can use method missing as a dispatcher: > > alias :old_mm :method_missing > def method_missing(method_name, *args, &block) >return MyCSharpClass.send(method_name, *args) if > MyCSharpClass.respond_

Re: [Ironruby-core] Calling a C# static from IronRuby

2009-11-13 Thread Ivan Porto Carrero
rom MyCSharpClass import mymethod > > print mymethod("foo") > > > > ~Jimmy > > > > *From:* ironruby-core-boun...@rubyforge.org [mailto: > ironruby-core-boun...@rubyforge.org] *On Behalf Of *Ivan Porto Carrero > *Sent:* Friday, November 13, 2009 11:04 AM > *To:* i

Re: [Ironruby-core] Calling a C# static from IronRuby

2009-11-13 Thread Jimmy Schementi
t mymethod("foo") ~Jimmy From: ironruby-core-boun...@rubyforge.org [mailto:ironruby-core-boun...@rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Friday, November 13, 2009 11:04 AM To: ironruby-core@rubyforge.org Subject: Re: [Ironruby-core] Calling a C# static from IronRuby You

Re: [Ironruby-core] Calling a C# static from IronRuby

2009-11-13 Thread Ivan Porto Carrero
You can only reach it by adding the class as receiver. but you can use method missing as a dispatcher: alias :old_mm :method_missing def method_missing(method_name, *args, &block) return MyCSharpClass.send(method_name, *args) if MyCSharpClass.respond_to? method_name old_mn method_name, *arg

Re: [Ironruby-core] Calling a C# static from IronRuby

2009-11-13 Thread Shay Friedman
I guess you can do that in two ways. The first one is to add a statement in Ruby code: class Object def mymethod(str) MyCSharpClass.mymethod(str) end end Or you can write an IronRuby extension in C# and make that class extend the Object class. Shay. --