2010-05-21 138 views
2

我最近決定嘗試升級到4.0。我仍然想不通的唯一錯誤是這個:在4.0編譯奇怪的「INavigatorContent」錯誤

「的光環導航的兒童必須實現INavigatorContent」

我似乎得到它在我的所有ViewStacks有驗證。

<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> 

該錯誤將被引發到驗證器標籤上。我的編譯器設置爲「flex 3兼容模式」,我的主題設置爲Halo(默認)。

這似乎應該是一個非常直接的修復,所以我討厭在我的車輪上旋轉太久。

任何想法可能會失蹤?

回答

2

經過一番閱讀有關Flex 4中,這似乎是所有非視覺元素應該在這些標籤去:

<fx:Declarations> 
    <!-- Place non-visual elements (e.g., services, value objects) here --> 
</fx:Declarations> 

(xmlns:fx="http://ns.adobe.com/mxml/2009") 

錯誤是有點兒奇怪。但是,經過一些清理,我得到了一個更好的錯誤:

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

很多,更有幫助。如果我找到我以前遇到的奇怪錯誤的原因,我會再次發佈。