[Ironruby-core] defined?(xxx) behaves differently when called from Silverlight

Jimmy Schementi Jimmy.Schementi at microsoft.com
Wed Apr 1 19:15:49 EDT 2009


Granted, it shouldn't throw ... and doesn't for me in SL.

rb> defined?(System::Windows::Forms)
=> nil
rb> defined?(System::Windows::Forms::Controls)
=> nil

> -----Original Message-----
> From: Jimmy Schementi
> Sent: Wednesday, April 01, 2009 4:13 PM
> To: ironruby-core at rubyforge.org
> Subject: RE: [Ironruby-core] defined?(xxx) behaves differently when
> called from Silverlight
>
> System::Windows::Forms doesn't exist in Silverlight. You want
> System::Windows::Controls.
>
> > -----Original Message-----
> > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-
> > bounces at rubyforge.org] On Behalf Of Thibaut Barrère
> > Sent: Wednesday, April 01, 2009 1:08 PM
> > To: ironruby-core
> > Subject: [Ironruby-core] defined?(xxx) behaves differently when
> called
> > from Silverlight
> >
> > Hi,
> >
> > I noticed something that I didn't expect while working with
> > Silverlight.
> >
> > defined?(System::Windows::Forms::Control)
> >
> > throws an exception:
> >
> > MemberAccessException: uninitialized constant System::Windows::Forms
> >    à IronRuby.Builtins.ModuleOps.ConstantMissing(RubyModule self,
> > String name)
> >    à _stub_$2##1(Closure , CallSite , CodeContext , RubyModule ,
> > SymbolId )
> >    à System.Scripting.Actions.MatchCaller.Call3[T0,T1,T2,TRet](Func`5
> > target, CallSite site, Object[] args)
> >    à System.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[]
> > args)
> >    à
> >
> System.Scripting.Actions.UpdateDelegates.Update3[T,T0,T1,T2,TRet](CallS
> > ite
> > site, T0 arg0, T1 arg1, T2 arg2)
> >    à IronRuby.Builtins.RubySites.ModuleConstMissing(CodeContext
> > context, RubyModule self, String name)
> >
> > The same call under ir.exe will work as expected in MRI.
> >
> > Can anyone else reproduce that issue (or is it something known
> > already), or is my silverlight install messing up ?
> >
> > cheers,
> >
> > -- Thibaut
> > _______________________________________________
> > Ironruby-core mailing list
> > Ironruby-core at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/ironruby-core



More information about the Ironruby-core mailing list