3 Replies Latest reply on Aug 30, 2006 8:46 AM by awclemen

    URGENT: Flex compiler Error

      Here's the quick summary:

      I have a custom MXML component defined in a package aaa.bbb.ccc (and
      the folder is aaa\bbb\ccc. If I reference it from an MXML
      application located in the project's root directory, all is good,
      using something like:

      <mx:Application xmlns:MyStuff="aaa.bbb.ccc.*"...>
      <MyStuff:MyComponent .../>

      However, if the application MXML is not in the root directory, there
      is a compile error attempting to resolve the custom component...

      How to get around this?


      - Rick Bullotta/SAP Labs

        • 1. Re: URGENT: Flex compiler Error
          JeffreyGong Level 1
          Creat your component in a Flex Library Project and put the .swc under the folder "user_classes" so that you can load it into your MXML applications anywhere as long as they are in the same J2EE server.

          • 2. Re: URGENT: Flex compiler Error
            RBullotta Level 1
            Thanks for the suggestion. That would work for a "finished" library, but the project is very dynamic and there are constant changes to the component classes and the application(s) that use them...

            I consider this to either be a pretty substantial design flaw if you can't properly reference classes/components in other packages from within the same project. This is definitely a major issue, since there doesn't appear to be a workaround besides what you've suggested.

            Appreciate the info!

            - Rick
            • 3. Re: URGENT: Flex compiler Error
              Level 1
              Well, in the project properties it allows to add more applications to the project - therefore assuming that multiple applications should be allowed to run within the same project. It should be noted however that only the default application shows in the window even though the application file is marked as a project application in the Navigator window.... I believe that is a bug in Flex Builder....

              But, like Rick, I am having the same classpath problems within Flex Builder. Unless I add the project folder as a source folder in the project, Flex Builder CANNOT find the files. This seems a bit silly considering the files are right there, with the correct path in the project.

              Is there a solution to this? Am I missing some step in setting up my project that would allow it to find files in the project? Or is this a bug? Is there a bug database that I can look this up at?