Skip navigation
FLT Coyote
Currently Being Moderated

Flex 4.6 SDK, "MX Only" ViewStack compiler Dilemma

Sep 19, 2012 10:09 AM

Tags: #viewstack #porting #flex4.6 #compiler_errors

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.

 
Replies
  • Currently Being Moderated
    Sep 19, 2012 10:26 AM   in reply to FLT Coyote

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 19, 2012 3:04 PM   in reply to FLT Coyote

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

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 15, 2013 12:10 PM   in reply to FLT Coyote

    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?

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 15, 2013 9:31 PM   in reply to BridalLive

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 20, 2013 6:57 AM   in reply to Flex harUI

    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!

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (1)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points