4 Replies Latest reply on May 9, 2011 12:41 PM by asdoghqa

    No compiler errors

    asdoghqa

      Hi there,

       

      I just installed flash builder burrito. When I create some as files they don't seem to be compiled. No compiler errors are showing when I write action script that cannot possibly can be compiled. Does anyone have an idea how this can be?

       

      Thanks in advance and kind regards,

       

      Piet

        • 1. Re: No compiler errors
          Anirudh Sasikumar Adobe Employee

          In a non-library project, files are only compiled if they are needed by any application or module present in the project. To make sure the file is compiled, add an import and use the class in your application.

          • 2. Re: No compiler errors
            asdoghqa Level 1

            Hi Anirudh,

             

            Thanks for your answer. I added some swc files to the lib directory of the project and then used some of the classes from the added libraries in .as files that I created myself. After that I messed up my own .as files a bit, but still no compilers errors appeared.
            When I create a java project in Flash Builder Burrito and write 'publik clazz' instead of 'public class' a compiler error instantly appears. When I do the same in an .as file in a flex project, nothing happens. I'm still facing the problem I'm afraid.

             

            Thanks and kind regards,

             

            Piet

            • 3. Re: No compiler errors
              Anirudh Sasikumar Adobe Employee

              Hi,

               

              In your Flex project, some files are "Application" files. (Project properites -> Flex applications) You have to import your newly created AS files in this application file.

               

              The idea here is that an application or module MXML/AS file is compiled to generate a SWF. It will pull in any classes needed to generate the SWF.

               

              A library project on the other hand is exactly as you describe - all classes are compiled by default. You don't have to import anything anywhere.

               

              -Anirudh

              • 4. Re: No compiler errors
                asdoghqa Level 1

                Hi Anirudh,

                 

                Thanks for your answer. 't Was helpful, I now understand how it works. I have to confess though, that up till this moment I think it's a bit unfortunate that I don't see compiler errors right away when I make a mistake in a .as file that isn't being used by the application file yet. Maybe I'll learn to love it later.

                 

                Thanks again and kind regards,

                 

                Piet