On 1/16/16, 3:14 AM, "lizhi" <s...@qq.com> wrote:

>thanks.but how code ant?
>
> <java jar="${FLEXJS_HOME}/js/lib/mxmlc.jar" resultProperty="errorCode"
>            fork="true">
>                       <arg value="-remove-circulars"></arg>
>        </java>
>
>this code?

Yes, assuming you are using the nightly builds.

The problem is this: Because each .as file becomes its own .js file, the
output needs to load each .js file in some order.  Thus the problem isn't
really a code-flow problem, but a script-loading problem.  Since we don't
know at compile time whether the main application will load A or B first,
A must load B and B must load A.  A cannot trust that some other code will
load B.

The -remove-circulars option was on by default in FlexJS 0.5.0, but we've
made it an option in the nightly builds and next release so folks can see
where they have these load-time circularities and choose to re-code those
sections.

Now if B isn't really a public class and only gets instantiated from A, it
should be possible to make B an internal class in A.as and eliminate the
load-time circularity.

-Alex

Reply via email to