`lzAddLocalData` is _not_ used for local datasets, it is used for
top-level datasets, see "DataCompiler.java". So that's a compile time
issue, which shouldn't be a problem even in swf9.
These two constructs no longer work to create a global object:
new <lznode subclass>(canvas, {name: 'foo'});
new <lznode subclass>(canvas, {id: 'foo'});
Hm, would it make sense to integrate "as3 global-support" like this
"http://www.uza.lt/codex/as3-global-object/"? That way you can create
code which works in all runtimes,
provided that everyone uses "global.foo" to access a global object.
On 4/10/2008 2:11 AM, P T Withington wrote:
Because I can't see how to implement that at runtime in swf9.
Currently, if I say:
new <lznode subclass>(canvas, {name: foo});
the global `foo` will be bound to my instance. In particular, this
idiom is currently used by `lzAddLocalData` and `lzpreloader`. Do
local datasets really need to be stored as globals? This seems like
namespace pollution to me. We can't do this in swf9 because swf9 does
not let you dynamically add global names.
I would like to remove support for a top-level name acting as an id.
In fact, our documentation says that both `name` and `id` are final,
which would indicate to me that you should not be able to supply them
at run time at all. IWBRN to remove this wart.