[Moonlight-list] Getting a basic IronPython SL app working in Moonlight
Sebastien Pouliot
sebastien.pouliot at gmail.com
Wed Jul 22 20:51:04 EDT 2009
Hello Jimmy,
On Wed, 2009-07-22 at 16:28 -0700, Jimmy Schementi wrote:
> Here's a pretty significant IronRuby app working in Moonlight:
> http://jimmy.schementi.com/silverlight/Tutorial/
>
>
> Is there a good way to detect that Moonlight is running it? I do a
> very naive test for System.Windows.Browser to differentiate between
> desktop/silverlight, but because some things don't work in Moonlight I
> want to differentiate it further.
I don't think we have (yet) a safe, future proof, way to detect
Moonlight (like we have one documented for Mono itself). I suggest you
test for a specific (internal) Moonlight type and react accordingly.
e.g. Type.GetType("Mono.MoonException, System.Windows, ...") !=
null
But don't interpret this as the final answer - it's not something that
should be used as-is since we want to fix things not working on
Moonlight (not have applications hide them ;-)
> BUT it crashes Firefox when I click on the "IronRuby tutorial", and
> then try to type something in the prompt. It's a TextBox with the
> KeyUp event hooked, it looks like the crash happens before control
> gets to the handler.
>
>
> Here's what Firefox spits out, in case it helps:
[removed]
This was one of the issue I have seen yesterday while testing webide (on
the control sample*). I fixed it this morning in r138413. You'll need to
update (again ;-) your plugin to that revision (or later).
Have fun at OSCON!
Sebastien
* it occurs because the plugin is running windowless (even if it does
not look like that was required for webide).
>
>
> On Wed, Jul 22, 2009 at 12:45 PM, Jimmy Schementi
> <jschementi at gmail.com> wrote:
> > The webide problem is fixed* in SVN r138338.
> > Your extra details about the '/' parts helped a lot.
>
>
> I got it working against that latest build of Moonlight!
> Thanks!!! Here's a little test app working:
> http://jimmy.schementi.com/silverlight/mlruby
>
>
> Now time to play with some non-trivial examples, I'll let you
> know if I have any other problems. Thanks!!!
>
>
> ~Jimmy
>
>
>
>
> On Tue, Jul 21, 2009 at 8:41 PM, Jimmy Schementi
> <jschementi at gmail.com> wrote:
> Ah yes, it is failing because ExtensionPart is
> referenced; the stack trace you gave me makes that
> clear. I can build the DLR without the SILVERLIGHT_3
> flag, which will avoid using ExtensionPart. I'll let
> you know what happens. Thanks!
>
> ~Jimmy
>
>
>
>
> On Tue, Jul 21, 2009 at 6:00 PM, Sebastien Pouliot
> <sebastien.pouliot at gmail.com> wrote:
> Hello Jimmy,
>
> System.Windows.ExtensionPart is new in
> Silverlight 3 and used to refer
> to external library packages (shared zip
> files). This feature does not
> yet exists in Moonlight.
>
> http://msdn.microsoft.com/en-us/library/system.windows.extensionpart(VS.95).aspx
>
> However this is not used inside of your
> AppManifest.xaml so I guess*
> you're shipping a new (3.0) assembly in your
> XAP file (which refers to
> that type).
>
> * well a bit more than a guess since
> grep says your XAP's
> Microsoft.Scripting.Silverlight.dll
> refers to this type
>
> Then again this message
> about System.Windows.ExtensionPart could be
> unrelated to real issue** but you may wish to
> try with older (2.0)
> assemblies to confirm this on Moonlight.
>
> ** but
>
> while http://jimmy.schementi.com/silverlight/sl-ipy-clock give
> me some output on SL2/XP - the only
> thing I get is the standard
> splashscreen followed by a
> TypeLoadException ;-)
>
> TypeLoadException: Error 0x80131522.
> Debugging resource strings are unavailable.
> See
> http://go.microsoft.com/fwlink/?linkid=106663&Version=2.0.31005.0&File=mscorrc.dll&Key=0x80131522
> at
> Microsoft.Scripting.Silverlight.DynamicAppManifest.UsesDLRExternals()
> at
> Microsoft.Scripting.Silverlight.DynamicAppManifest.LoadAssemblies(Action onComplete)
> at
> Microsoft.Scripting.Silverlight.DynamicApplication.DynamicApplication_Startup(Object sender, StartupEventArgs e)
> at
> System.Windows.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
> at MS.Internal.JoltHelper.FireEvent(IntPtr
> unmanagedObj, IntPtr unmanagedObjArgs, Int32
> argsTypeIndex, String eventName)
>
> Sebastien
>
>
> On Tue, 2009-07-21 at 18:00 -0400, Sebastien
> Pouliot wrote:
> > Hello Jimmy,
> >
> > The webide problem is fixed* in SVN r138338.
> Your extra details about
> > the '/' parts helped a lot.
> >
> > If you cannot build moonlight from SVN then
> you should try to install
> > the unsigned XPI that our build bots
> produce. Once built the links will
> > be shown on those URLs.
> >
> > [x86_64]
> >
> http://sublimeintervention.com:8123/ViewLane.aspx?lane_id=4&host_id=7&revision_id=8633
> >
> > [x86]
> >
> http://sublimeintervention.com:8123/ViewLane.aspx?lane_id=4&host_id=6&revision_id=8633
> >
> >
> > No fix yet
> about http://jimmy.schementi.com/silverlight/sl-ipy-clock
> > With the previous commit it seems to be
> looking for the (missing)
> > System.Windows.ExtensionPart class
> >
> > Sebastien
> >
> > * there seems to be a few other buglets
> around but hopefully they will
> > be solved in later revisions.
> >
> >
> > On Tue, 2009-07-21 at 13:28 -0700, Chris
> Toshok wrote:
> > > We've spent some cycles tracking this
> down, but nothing concrete
> > > toward fixing it (yet). It's similar to
> problems that have crept in
> > > to make the tests work which cause
> problems with several deployed
> > > sites, like netflix. We'll put some
> effort in tonight and hopefully
> > > have some good news for you in the
> morning.
> > >
> > > Chris
> > >
> > > On 07/21/2009 01:13 PM, Jimmy Schementi
> wrote:
> > > > Any thoughts? Sorry for the urgency, but
> I'd like to show Moonlight
> > > > and IronRuby at OSCON on Thursday.
> > > >
> > > >
> > > > Thanks,
> > > > ~Jimmy
> > > >
> > > > On Jul 21, 2009, at 1:19 AM, Jimmy
> Schementi <jschementi at gmail.com>
> > > > wrote:
> > > >
> > > >
> > > > > I'm trying to get a simple IronPython
> application working in
> > > > > Moonlight:
> > > > >
> http://jimmy.schementi.com/silverlight/sl-ipy-clock
> > > > > (Download:
> > > > >
> http://jimmy.schementi.com/silverlight/sl-ipy-clock.zip)
> > > > >
> > > > > This works in Silverlight 2 and
> Silverlight 3, but not Moonlight
> > > > > 1.9.6. And the error is unfortunately
> not that helpful:
> > > > >
> > > > > Unhandled Error in Silverlight 2
> Application
> > > > > Code: -1
> > > > > Category: RuntimeError
> > > > > Message: A type load exception has
> occurred.
> > > > > MethodName: 0
> > > > >
> > > > > file:///srv/www/htdocs/clock/error.js
> > > > > Line 31
> > > > >
> > > > > Also, the Python WebIDE
> > > > >
> (http://www.voidspace.org.uk/ironpython/webide/webide.html) does
> > > > > not work, though is site says it does
> > > > >
> (http://go-mono.com/moonlight/MoonlightStatus.aspx?v=2). FWIW,
> > > > > most of the examples on that page do
> work for me. The error
> > > > > message this encounters is a bit more
> descriptive: this app uses a
> > > > > slightly-undocumented feature (I've
> documented it on my blog =P)
> > > > > which will load an assembly outside
> the XAP file if a the
> > > > > AppManifest.xaml file has a
> <AssemblyPart Source="<uri>" />
> > > > > element where <url> is a rooted
> relative URL
> > > > > (eg /deploy/IronPython.dll) or a
> fully-qualified URI. And it seems
> > > > > that Moonlight doesn't support this
> yet:
> > > > >
> > > > > Unhandled Error in Silverlight 2
> Application Code: 2105 Category:
> > > > > RuntimeError Message: Trying to load
> the assembly
> > > > >
> '/deploy/Microsoft.Scripting.ExtensionAttribute.dll' outside the
> > > > > XAP directory. MethodName: 0
> > > > >
> > > > > I've installed the Moonlight 2.0
> Preview 7 (1.9.6) on the VMware
> > > > > Suse VM here:
> > > > >
> http://ftp.novell.com/pub/mono/appliance/2.4.2.1/Mono-2.4.2.1-vmx.zip.
> > > > >
> > > > > What is the preferred way I can debug
> a Moonlight app so I can
> > > > > give you guys better bug reports?
> > > > >
> > > > > Thanks!
> > > > > ~Jimmy
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> ____________________________________________________________________
> > > >
> > > >
> _______________________________________________
> > > > Moonlight-list mailing list
> > > > Moonlight-list at lists.ximian.com
> > > >
> http://lists.ximian.com/mailman/listinfo/moonlight-list
> > > >
> > >
> > >
> _______________________________________________
> > > Moonlight-list mailing list
> > > Moonlight-list at lists.ximian.com
> > >
> http://lists.ximian.com/mailman/listinfo/moonlight-list
> >
> >
> _______________________________________________
> > Moonlight-list mailing list
> > Moonlight-list at lists.ximian.com
> >
> http://lists.ximian.com/mailman/listinfo/moonlight-list
>
>
>
>
>
>
>
>
More information about the Moonlight-list
mailing list