At jaspa.org.uk/examples you can view interactive examples and full, highlighted source code. These examples are going to grow, particularly those in the jaspa.dom package, as this is heavily under construction. When an API feature is enabled an example will be added to this repository to serve as both a reference and a test case.
I was further convinced this week that the world needs JASPA when my Flash developer colleague asked me about closures in JavaScript. He’s been knee-deep in AS3 for almost a year, so JavaScript must seem rather weak now.
Unlike JavaScript and AS2, AS3 supports method closures implicitly; so I made sure they were built into the JAS language. Such a thing is not native to JavaScript so the JASPA compiler automatically generates a call to helper function jaspa.closure whenever an object’s method is referenced.
If you’ve ever used Delegate.create in AS2, then you’ve encountered this issue. If you don’t see the problem, consider this example in JavaScript:
Read more…
JASPA.DOM is now an open source project on SourceForge
I’ve decided to set up an open source project for the jaspa.dom package; it is to be found on SourceForge.
http://sourceforge.net/projects/jaspa-dom. It’s my first attempt at anything like this, so I’m bumbling around a bit, but the downloads are there and the CVS repository is also up and running. Any developers who are serious about helping develop this API should put a request to join the project on SourceForge.
What?
The main JASPA project is a platform which allows you to write a grown up language (practically identitcal to AS3), and have it compiled into regular JavaScript. If you don’t know why this is really cool, then you may as well stop reading now.
japsa.dom is the name of the DOM scripting package which allows you to compile browser-based code with JASPA. It’s a completely separate project, and is quite possibly larger and more complex. It is certainly less mature. The JASPA compiler is behaving pretty well, but the API code base is very much incomplete.
Read more…
Explorer throws an unknown error when you set innerHTML
The bug seems to only occur for certain markup. I’m not 100% sure what the defining problem is, except that markup containing block elements like <div> and <p> seem to invoke the error. Anyway, this drove me up the wall recently so I thought I’d share the work around I came up with.
Read more…