IronPython + Silverlight 2β2
This finally bubbled to the top of my "must get around to, some time" stack today…
Recording what I needed to do to get the second Voidspace controls example to work with the later beta:
- Remove all the assemblies in the
appfolder. - Copy in
System.Windows.Controls.Extended.dll(only) from the Silverlight beta 2 SDK. - In the web page, set the
typeto be"application/x-silverlight-2-b2". - In
AppManifest.xaml, updateRuntimeVersionto"2.0.30523.06". - Add
<AssemblyPart Source="Microsoft.Scripting.Core.dll" />to the manifest. - In the python source, remove the
System.Windows.Controlsreference, and updateSystem.Windows.Controls.Extendedto version 2.0.5.0. - Replace
WatermarkTextBoxwith just plainTextBox.
Only needing an <object> tag with type and data attributes, it works in Firefox 3 -- you just have to explicitly go and install the beta (the fallback link inside the <object> tag didn't show with FF3 and Silverlight 1).
So here it is -- 1k of code along with 1.2M of infrastructure assemblies (which is a megabyte more weight than Jython would need for the equivalent).
Sample removed from here 13-Dec-08 as the beta release is now obsolete.. New sample here.
For comparison
274467 Aug 13 21:47 applet.jar
1229665 Aug 12 20:22 app.xap
2260 Aug 12 20:22 index.html
2071 Aug 13 21:47 jython.html
1 comment :
Heh, thanks. :-)
I've actually updated most of my examples to 2b2, just not posted them on the web yet. :-(
Hopefully I'll find time for it soon. Also, you can specify that the IP / DLR assemblies be kept outside the xap - and then they can be shared between applications and live in the browser cache (just downloaded once per site).
Post a Comment