Monday, August 04, 2014

Namespace in ActionScript (how to get ObjectProxy's object)

Example, to get raw object of ObjectProxy, your code has to be something like this:

var op:ObjectProxy = new ObjectProxy({a: 1});
var obj:Object = op.object_proxy::object; //get what you wanted 
obj = op.object; //you get undefined here

Actionscript's documentation did not show any namespace qualification. Flash builder's debugger will show correct content in "op.object". All these leads to confusion. So, hopefully this little note can save somebody an hour of head scratching.

No comments: