0 Replies Latest reply on Jan 29, 2013 11:32 PM by cdsvvxv

    -load-externs seems to ignore custom classes

    cdsvvxv

      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?