As you have discovered, changing class hierarchy and -keep don't go very
well together.  Classes need to be initialized in the proper order, or the
prototype chain isn't set up correctly.  When you use the keep flag, mtasc
keeps all existing classes (and preserves their order), and then adds all
the additional classes compiled afterwards (in the correct order for class
initialization).  But if the class hierarchy changes, the order from the
inject swf may be wrong, and mtasc doesn't change it.  You can see this
using a tool like asv.

You can easily lose hours to these types of errors, because things mostly
work, which is why everyone advises moving all classes out of the FLA
generated swf.

You should have better luck if ONLY the v2 components/classes are in the
swf, since you won't likely change the v2 base classes.

--Brian

On 8/5/07, Hans Wichman <[EMAIL PROTECTED]> wrote:
>
> Hi Ron,
>
> my swf contains v2 components, including their classes.
> Im compiling against the v2 component framework in intrinsic format so i
> need the classes in the swf.
>
> In addition we use a hybrid kind of project setup where u you can work in
> either the flash ide or in flashdevelop.
> This is not required, but the timeline has been setup for preloading and
> starting the main application, so one way or another our classes will be
> in
> the injection swf.
>
> The useMain is set to false in flashdevelop btw.
>
> So there is no error msgs everything works ok, except for the fact that
> introducing superclasses has some weird results if you dont recompile the
> injection swf.
>
> greetz
> JC
>
>
> On 8/4/07, Ron Wheeler <[EMAIL PROTECTED]> wrote:
> >
> > It is not clear why any classes are in the swf from the IDE. Can you not
> > remove your classes from the fla? That will make you life simpler and
> > get your code into one IDE rather than spread out over 2.
> >
> > What is the error message?
> >
> > Ron
> >
> > Hans Wichman wrote:
> > > Hi list,
> > >
> > > can someone point me to a clear explanation of the -keep flag in
> mtasc?
> > >
> > > The only info I can find is that -keep causes precompiled classes in
> the
> > > injection swf to be kept and that this may result in some classes
> being
> > > added twice, but only the first class definition will be used.
> > >
> > > However when testing this it seems the second class definition is
> being
> > used
> > > (luckily, since it would be useless otherwise).
> > >
> > > In addition when introducing a superclass for a class during
> refactoring
> > i
> > > *have* to recompile the swf in the IDE first otherwise mtasc will not
> > > recognize it. Anybody know why?
> > >
> > > thanks!
> > > JC
> > > _______________________________________________
> > > Flashcoders@chattyfig.figleaf.com
> > > To change your subscription options or search the archive:
> > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > >
> > > Brought to you by Fig Leaf Software
> > > Premier Authorized Adobe Consulting and Training
> > > http://www.figleaf.com
> > > http://training.figleaf.com
> > >
> > >
> > >
> > _______________________________________________
> > Flashcoders@chattyfig.figleaf.com
> > To change your subscription options or search the archive:
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> > Brought to you by Fig Leaf Software
> > Premier Authorized Adobe Consulting and Training
> > http://www.figleaf.com
> > http://training.figleaf.com
> >
> _______________________________________________
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to