我最近决定尝试升级到 4.0。我仍然无法解决的唯一错误是这个:
“Halo 导航器的子级必须实现 INavigatorContent”
我似乎在所有具有验证器的 ViewStack 上都得到了它。
<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(默认)。
这看起来应该是一个非常简单的修复,所以我讨厌在它上面旋转太久。
有什么想法我可能会错过吗?
最佳答案
在阅读了有关 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'.
非常非常有帮助。如果我找到之前遇到的奇怪错误的原因,我会再次发布。
关于flex4 - 4.0 中编译出现奇怪的 "INavigatorContent"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2885897/