flex4upgradehalo

Strange "INavigatorContent" error compiling in 4.0


I've recently decided to try an upgrade to 4.0. The only error I still can't work out is this one:

"The children of Halo navigators must implement INavigatorContent"

I seem to be getting it on all my ViewStacks that have validators.

<mx:ViewStack xmlns:mx="http://www.adobe.com/2006/mxml">
 <mx:NumberValidator id="systolicValidator"
      source="{systolic}"
      required="true"
         property="text"
      minValue="10"
      maxValue="300"
      domain="int"/>
 <mx:NumberValidator id="diastolicValidator"
      source="{diastolic}"
      required="true"
      property="text"
      minValue="10"
      maxValue="200"
      domain="int"/>
 <mx:TextInput id="systolic"/>
 <mx:TextInput id="diastolic"/>
    ...
</ViewStack> 

The error gets thrown on the validator tags. My compiler is set to "flex 3 compatibility mode" and my theme is set to Halo (default).

This seems like it should be a really straight forward fix, so I hate to spin my wheels on it for too long.

Any ideas what I might be missing?


Solution

  • After some reading about Flex 4, it would seem that all non-visual elements should go in these tags:

    <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    
    (xmlns:fx="http://ns.adobe.com/mxml/2009")
    

    The error was kinda strange. However, after some cleanup, I got a better error:

    '*' declaration must be contained within the <Declarations> tag since it does not implement 'mx.core.IUIComponent'.

    Much, much more helpful. I'll post again if I find the reason for the strange error I was getting before.