[You know I hate making announcements... It seems like my expectations are always higher than what actually happens. I've announced stuff before that I thought was somewhat impressive -- maybe not though-- with like zero interest]
This weekend I created a new project over at CodePlex called "DLRScript." I put this ominous description - "DLRScript is a SilverLight 2.0 sample using the DLR. It is based on the DLRConsole found in the sample in the SilverLight 2.0 SDK, but with a new advanced twist (check back here for more info later... I want to be the first to do this which is why I'm mum on the subject) "
I started thinking about how with SilverLight 2.0 we could actually add new languages that could be put into a script tag. So I built it..
A picture is worth 1,000 words
Here's whit it looks like-
If you look closely I have a custom object called DomHelper. The reason that exists is that I am currently having problems adding namespaces (but I can easily add variables to the script environment). DomHelper knows how to do a couple things. Send Alerts, and Create An Event Handler from a method name (there are others, but I need to work on them).
That "document" variable is not the standard DOM document, but a reference to the SilverLight environment's HtmlPage.Document. Right now I am having problems with setting the property values of DOM Element (I will be fixing that soon).
Some caveats (it's an alpha what do you want?)
- You need to have the SilverLight 1.1 Alpha Refresh (from September) installed.
- The project is a VS2008 project so you'll need that and the VS2008 Tools for Silverlight alpha (I think this came out in December)
- I have exactly 1 DLR language working: Python.
- I will try to get Ruby working shortly.
- I have code in place for DLRJScript, but it doesn't work (I'm getting an initialization error).
- I don't have the files to try VBx.
- Everything will change after Mix and the release of the beta (unless someone from MS wants to give me a pre-release <wink />)
- The code is a mess right now, so consideer it a rough prototype (that works)
- Get ALL existing DLR Languages working (the one I haven't mentioned yet is IronScheme... are there others?)
- Be able to fully traverse the DOM (this may be working... I just may need to figure out how to get it working... a gold star to anyone who figures it out before me)
- Be able to load modules from the file system (setting a the source attribute for a DLR Language)
- Come up with a sane way to compress a python (or other language) script (maybe there already is a way that I don't know about). Python appears to be a little more chatty (and being able to minimize the download)
The project will be available to download shortly...