Archive

Posts Tagged ‘JavaScript’

IE native functions "bug"?

December 28th, 2008 1 comment

In my article about method closures I showed a way to neatly create a portable reference to an object method that doesn’t  ‘forget’ the object it belongs to. I have since discovered an aggravating problem on – you’ll never guess – Internet Explorer!

Read more…

JavaScript Method Closures

November 24th, 2008 2 comments

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…

IE innerHTML bug

November 12th, 2008 4 comments

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…

JASPA says "Hello World"

October 26th, 2008 1 comment

JASPA is a JavaScript cross-compiler written in PHP.

Write robust object-orientated applications in a strongly-typed language (modelled on AS3) and compile it into regular JavaScript to run in a web page, or any other environment that implements a JavaScript engine.

Download JASPA from SourceForge
https://sourceforge.net/project/showfiles.php?group_id=243463

Read more…

JASPA Sneak Preview

September 11th, 2008 No comments

This article has been superseded by the official JASPA website … Please visit http://jaspa.org.uk/

Tags: ,