Hi, I would like to know why interoperability is such a long word? just kidding! I''m playing with the CLR interoperability and I have some questions: 1. Is "require ''mscorlib''" really essential? 2. Should investigating Clr objects work? For example, this is what happens now:>>> System::Data::DataSet.instance_methods - Class.methods=> [] Only after I create a dataset object and access, for instance, the tables property, the "tables" method is added to the instance_methods list. Many thanks! Shay. ---------------------------- http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/.
Require ''mscorlib'' is not as essential anymore. If you run ir -e "puts System::String.class" it will wolrk just fine. I still use require ''mscorlib'' in my scripts tlo signal to other programmers that this scrpt will use .NET interop, but I don''t think it is needed. I''ll let Tomas answer the second part, and clarify my answer if needed. JD ....there is no try Sent from my phone. Please excuse typos and txtspk. -----Original Message----- From: Shay Friedman <lists at ruby-forum.com> Sent: June 07, 2009 9:45 AM To: ironruby-core at rubyforge.org <ironruby-core at rubyforge.org> Subject: [Ironruby-core] Basic interoperability question Hi, I would like to know why interoperability is such a long word? just kidding! I''m playing with the CLR interoperability and I have some questions: 1. Is "require ''mscorlib''" really essential? 2. Should investigating Clr objects work? For example, this is what happens now:>>> System::Data::DataSet.instance_methods - Class.methods=> [] Only after I create a dataset object and access, for instance, the tables property, the "tables" method is added to the instance_methods list. Many thanks! Shay. ---------------------------- 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
As for #2: it doesn''t work yet. instance_methods currently only includes Ruby methods and methods that were already called (are cached) but it should indeed include names of all instance CLR members. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jim Deville Sent: Sunday, June 07, 2009 11:49 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Basic interoperability question Require ''mscorlib'' is not as essential anymore. If you run ir -e "puts System::String.class" it will wolrk just fine. I still use require ''mscorlib'' in my scripts tlo signal to other programmers that this scrpt will use .NET interop, but I don''t think it is needed. I''ll let Tomas answer the second part, and clarify my answer if needed. JD ....there is no try Sent from my phone. Please excuse typos and txtspk. -----Original Message----- From: Shay Friedman <lists at ruby-forum.com> Sent: June 07, 2009 9:45 AM To: ironruby-core at rubyforge.org <ironruby-core at rubyforge.org> Subject: [Ironruby-core] Basic interoperability question Hi, I would like to know why interoperability is such a long word? just kidding! I''m playing with the CLR interoperability and I have some questions: 1. Is "require ''mscorlib''" really essential? 2. Should investigating Clr objects work? For example, this is what happens now:>>> System::Data::DataSet.instance_methods - Class.methods=> [] Only after I create a dataset object and access, for instance, the tables property, the "tables" method is added to the instance_methods list. Many thanks! Shay. ---------------------------- 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
Should require ''mscorlib'' not be needed though? Does the first reference to "System" do this automatically? JRuby requires that you do "require ''java''" to get at any Java classes, and I''m not what the benefit to doing it implicitly is. IronPython also has the "import clr" requirement, so what to people thing about the lack of a signal as to whether a IronRuby script uses .NET types or not? Tomas, can you elaborate on why this is technically not needed anymore?> -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Tomas Matousek > Sent: Sunday, June 07, 2009 4:04 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Basic interoperability question > > As for #2: it doesn''t work yet. instance_methods currently only includes Ruby > methods and methods that were already called (are cached) but it should > indeed include names of all instance CLR members. > > Tomas > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Jim Deville > Sent: Sunday, June 07, 2009 11:49 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Basic interoperability question > > Require ''mscorlib'' is not as essential anymore. If you run ir -e "puts > System::String.class" it will wolrk just fine. I still use require ''mscorlib'' in my > scripts tlo signal to other programmers that this scrpt will use .NET interop, > but I don''t think it is needed. > > I''ll let Tomas answer the second part, and clarify my answer if needed. > > JD > > ....there is no try > Sent from my phone. Please excuse typos and txtspk. > > -----Original Message----- > From: Shay Friedman <lists at ruby-forum.com> > Sent: June 07, 2009 9:45 AM > To: ironruby-core at rubyforge.org <ironruby-core at rubyforge.org> > Subject: [Ironruby-core] Basic interoperability question > > > Hi, > > I would like to know why interoperability is such a long word? > > just kidding! > > I''m playing with the CLR interoperability and I have some questions: > 1. Is "require ''mscorlib''" really essential? > 2. Should investigating Clr objects work? > For example, this is what happens now: > >>> System::Data::DataSet.instance_methods - Class.methods > => [] > > Only after I create a dataset object and access, for instance, the tables > property, the "tables" method is added to the instance_methods list. > > Many thanks! > Shay. > > ---------------------------- > 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 > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core