On 2010-05-25, at 10:09, Henry Minsky wrote:

> On Tue, May 25, 2010 at 9:33 AM, P T Withington <[email protected]> wrote:
>> It seems like each .swc library needs a top level class, like the app class,
>> that the app class needs to link to and run?Or is there some feature of flex
>> Luba we don't know about that does this for you?
>> 

Luba => libs (thank you iPhone auto-correct).

>> There is the issue that the lzo gloms a lot of individual files together and
>> linking against it may only want some of that. How do we track which
>> toplevel expressions go with which piece?  Perhaps the top level exprs of
>> each include in an lzo must be in their own class and the main app must
>> instantiate that top level class for every include it uses.
> 
> Well the semantics of doing an <include> are that if the file you're
> including instantiates
> any views, they should get instantiated in the main app.  So if you
> are using an lzo made out of files
> that instantiate views, then I think they all must get instantiated in
> the main app.
> 
> Any class declarations in lzo .swc files  just work as expected. The
> flex linker is smart enough to only pull out the class files it needs
> from the .swc libraries when it's compiling the main app.
> So the only thing I think we need to worry about are other top level
> statements, which would in practice are all calls to LzInstantiateView.
> 
> I don't *think* the LZX compiler
> outputs any other kinds of statements, except for a couple related to
> app init and startup (i.e., canvas.initDone(),
> and some debugger setup), and those are emitted by the main app
> compiler, they shouldn't be in the
> lzo libraries.
> 
> So maybe we can special case this to collecting calls that do  view
> instantiation ?

I think the swf10 back-end needs to understand that when it is compiling a an 
include to a fat-lzo (i.e., to a .swc), the top-level expressions _still_ need 
to be gathered up into a class (just like the app class that is used for a 
whole app compile).  These classes should be somehow named for the include, 
probably by converting the include path to flex package notation or something?  
And finally, when linking an app against a fat-lzo in swf10, the main app 
top-level expression class needs to get a statement added for each include that 
instantiates the include's top-level expression class (so the top-level 
expressions from the include get run in the main app).


Reply via email to