incubator-flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank Wienberg <fr...@jangaroo.net>
Subject Re: [ASJS] Adjusting FalconJS output (no general discussion in this thread, please)
Date Fri, 07 Dec 2012 12:21:55 GMT
On Fri, Dec 7, 2012 at 10:12 AM, Erik de Bruin <erik@ixsoftware.nl> wrote:

> adobe.classes["com.example.components.MyTextButton"]
>  = com.example.components.MyTextButton;
> [#Remove line, obsolete]
>

I think I can imagine why the original author (Bernd?) added this output.
Using nested JavaScript objects to represent packages is nice, because it
resembles the ActionScript syntax, but has a runtime penalty for nested
packages (serveral property accesses instead of one) which may be hard to
optimize for GCC. Also, it pollutes the global scope, because all top-level
packages (here: "com") are added as properties of the global object.
Imagine someone calls a package "alert.acme.flex"!
Thus, it could be an option to only add packages to a global PACKAGES hash
(which is in turn inside the "apacheflex" namespace or whatever we'll name
the global framework object), and only copy those packages/classes to the
more JavaScript-friendly format which are "exported".

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message