6 Replies Latest reply: Mar 20, 2013 6:57 AM by BridalLive RSS

    Flex 4.6 SDK, "MX Only" ViewStack compiler Dilemma

    FLT Coyote Community Member

      I am attempting to upgrade a application built with Flex 3.5 SDK to use the 4.6 SDK. The main reason for the upgrade is to allow for captive Runtime and ANE support for an installed app, which according to documentatio is only available together with 4.6 or later. In the interest of not having to change a great deal of code, I am attempting to compile with the "MX Only" library support. When I compile, I get errors that children of ViewStack must implement the INavigatorContent interface. Looking at the documentation, the children I am using (Canvas) does implement this Interface. In a work around attempt, I created a class that Extends Canvas and Implements INavigatorContent.

       


      public class ViewStackCanvas extends Canvas implements INavigatorContent

       

      Then I get the errors "Interface method createDeferredContent in namespace mx.core:IDeferredContentOwner not implemented by class" & "Interface method get deferredContentCreated in namespace mx.core:IDeferredContentOwner not implemented by class ". So I add the methods mentioned:

       



      public function createDeferredContent():void {}


      public function get deferredContentCreated():Boolean {return false;}

       

      then get the error "Overriding a function that is not marked for override". So, then I mark them as override methods:

       



      public override function createDeferredContent():void {}


      public override function get deferredContentCreated():Boolean {return false;}

       

      then I get the error "Method marked override must override another method".

       

      It seems the only way to get rid of this compiler error is to use the spark.NavigatorContent class, which would require me to use spark, which results in pages of errors that would need to be worked around. Has anyone found a simplier way to fix this error, since according to the documentation Canvas extends Container which implements INavigatorContent, and compiled in flex 3, so there appears to be no reason for the compiler error to begin with.

        • 1. Re: Flex 4.6 SDK, "MX Only" ViewStack compiler Dilemma
          Flex harUI Adobe Employee

          Hmm.  Maybe there’s a problem with MX-only mode.  Try using the default mode and just don’t use any Spark component, including NavigatorContent, and see if you get the same error.  Then post how you are setting up your viewstack if you do.

          • 2. Re: Flex 4.6 SDK, "MX Only" ViewStack compiler Dilemma
            FLT Coyote Community Member

            So, if I use the "MX + Spark" option, I get a bunch of other errors, like "backgroundAlpha" only supported in 'Halo' and the like, which are the errors I am attempting to avoid having to address. as far as the use in the viewstack:

             

            <mx:ViewStack id="mainViewStack" x="20" y="20" width="{ width - 40 }" height="{ height - VERTICAL_OFFSET - 40 }" clipContent="false">

                <shared:ViewStackCanvas id="loadingContainerCanvas" width="100%" height="100%" mouseChildren="false" mouseEnabled="false">

                    ...Snip...

                </shared:ViewStackCanvas>

                <shared:ViewStackCanvas id="mainContainerCanvas" width="100%" height="100%" clipContent="false" mouseEnabled="false">

                    ...Snip...

                </shared:ViewStackCanvas>

            </mx:ViewStack>

             

            Hope that helps

            • 3. Re: Flex 4.6 SDK, "MX Only" ViewStack compiler Dilemma
              Flex harUI Adobe Employee

              Try using MX + Spark, but choose the halo theme.

              • 4. Re: Flex 4.6 SDK, "MX Only" ViewStack compiler Dilemma
                BridalLive

                We are having this same issue and can't figure it out.  On one our machines, there are no compile errors.  Then on the other computer, we have the "must implement INavigatorContent" all over the place.

                 

                We took FlashBuilder out of the picture completely by using ANT to compile (mxmlc) and this yeilds the same results. 

                 

                We are both using the exact same SDK.  I zipped it up and sent it to my co-worker.   So there should be no differences at all between our environments.

                 

                We are both running Windows 7.

                 

                What gives here?

                • 5. Re: Flex 4.6 SDK, "MX Only" ViewStack compiler Dilemma
                  Flex harUI Adobe Employee

                  Try this:  Create a test app w/o navigators but uses the container you are using as the child of the navigator that is causing the error. As in:

                   

                   

                   

                   

                  Compile it on both computers with the –link-report option and compare the link reports.  Check the paths to the containers and INavigatorContent and see if they match.  They should if they are coming from the same SWC, but if some other SWC is getting in there, then the path will be different.

                  • 6. Re: Flex 4.6 SDK, "MX Only" ViewStack compiler Dilemma
                    BridalLive Community Member

                    Thanks for the tip.

                     

                    The problem is that on the failing project, the link report will not generate because of the compile errors.

                     

                    I am stuck on this now.  Event the spark components are causing compile errors in this project. 

                     

                    There are a few external dependencies and I guess I'll go through each one to see if they might be causing a conflict.

                     

                    Any additional tips or tricks to help resolve this would be so awesome.  Thanks guys!