Skip navigation
cdsvvxv
Currently Being Moderated

-load-externs seems to ignore custom classes

Jan 29, 2013 11:32 PM

Tags: #module #mxmlc #load-externs #link-report

I have an application structure as follows:

 

project-root

        |

        | ----- src

        |          | ----- modules

        |          |               |----- mymodule1

        |          |               |               | ----- MyModule1.mxml

        |          |               |

        |          |               |----- mymodule2

        |          |               |----- mxmlc-config.xml

        |          |

        |          | ----- rest of packages

        |          | ----- Main.mxml

        |

exclude.xml (generated by -link-report)

 

When I build the Main.mxml I use:

 

-link-report exclude.xml src\Main.mxml

 

to generate a exclude.xml in the root of the project directory. I then compile my modules using:

 

@mxmlc -load-config+=src\module\mxmlc-config.xml -o=MyModule1.swf

 

The exclude.xml contains all of the Flex classes and also the classes from Main.mxml. However if in a module I use:

 

private var _myMainProjectClass:MyMainProjectClass;

 

I get the following warning:

Warning: Main is a module or application that is directly referenced. This will cause Main and all of its dependencies to be linked in with module.mymodule1:MyModule1. Using an interface is the recommended practice to avoid this.

 

Why is MyMainProjectClass not excluded in the build of MyModule1.swf?

 

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points