5 Replies Latest reply on Oct 17, 2009 1:12 AM by paul.williams

    FlexSDK-Ant-Eclipse Compiler wonkiness

    shipwrecked

      Hey all,

       

      I'm hoping to get some insight on this issue.

       

      I'm compiling AS3 apps through the FlexSDK Ant task in Eclipse. When I compile, even if I have flagrant AS errors, or entirely destroyed class packages, the Ant Task still says basically:

       

      "YAY! You Rock! Build Completed!"

       

      It does create the swf files, however, my AS changes do not appear to be injected into these swfs. I've verified all the silly little things -- creating the right files, in the right places, and targeting them properly. However, there is clearly something I don't understand.

       

      Would really appreciate any leads.

       

      Thanks.

        • 1. Re: FlexSDK-Ant-Eclipse Compiler wonkiness
          paul.williams Level 4

          Have you imported and instantiated the classes in your application?

          • 2. Re: FlexSDK-Ant-Eclipse Compiler wonkiness
            shipwrecked Level 1

            Hey. Thanks for reply.

             

            Yes this application is a fully functioning AS3 app delivered to me. I know the app functions properly. However, upon looking deeper, my Ant Task succeeds, says it has created a swf, but no swf ever appears on the machine. I've tried this with even a super simple HelloWorld example and the build suceeds, swf is said to be created in a certain directory, however it never does.

             

            There are no mxmlc compile errors, no compc errors, and I'm not really sure what's going on.

            • 3. Re: FlexSDK-Ant-Eclipse Compiler wonkiness
              paul.williams Level 4

              Mxmlc can fail silently when it does not have sufficient permissions to write to the output directory. Many windows directories will have additional restrictions by default such as the root directory on the disk and anything under the Program Files directoy. Try building to a location you know you have permission to write to such as C:/Users/<your username> or My Documents.

              • 4. Re: FlexSDK-Ant-Eclipse Compiler wonkiness
                shipwrecked Level 1

                I feel like something is silently failing, you're right.

                 

                The swf is supposed to be generated in the eclipse project root, which it definitely has access/permissions for.

                 

                In general, I'm not at all comfortable with the idea that something can simply "fail silently" without telling you what it is upset about.

                 

                I've just completed Jake Hilton's simple setup tutorial -- kinda break things down to the most simple form.

                http://www.jakehilton.com/?q=node/27

                 

                Even in this case I get a successful build with no swf, implying something is weird in my environment.

                 

                So, 2 questions if you/anyone has a moment.

                 

                1) Is there some better way to debug this sort of process beyond simply guessing. Console says mostly adorable and useless things. Surely there is some means of exploring what is happening?

                 

                2) Has anyone run into a similar problem or discovered actually useful documentation?

                 

                Thanks many muchos.

                j

                • 5. Re: FlexSDK-Ant-Eclipse Compiler wonkiness
                  paul.williams Level 4

                  Whether you are comfortable or not with mxmlc failing silently does not stop it from happening.

                   

                  Take ant out of the equation and run mxmlc directly by hand:

                   

                  c:/<path-to-mxmlc>/mxmlc -output c:/Users/<your username>/SmallTestApp.swf SmallTestApp.mxml


                  The SmallTestApp could just be a empty set of application tags saved as an MXML file, eg:

                   

                  <?xml version="1.0" encoding="utf-8"?>
                  <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
                     
                  </mx:Application>