我有一个运行良好的网络应用程序。我现在正在尝试制作一个桌面版本供我们内部使用。我已对其进行了转换并将标签更改为“WindowedApplication”。当我尝试运行 Air 应用程序时,出现错误:
ArgumentError: Undefined state 'normalAndInactive'.
at mx.core::UIComponent/getState()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:10596]
at mx.core::UIComponent/findCommonBaseState()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:10616]
at mx.core::UIComponent/commitCurrentState()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:10370]
at mx.core::UIComponent/commitProperties()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:8294]
at spark.components.supportClasses::GroupBase/commitProperties()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\supportClasses\GroupBase.as:1128]
at spark.components::Group/commitProperties()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\Group.as:886]
at mx.core::UIComponent/validateProperties()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:8209]
at spark.components::Group/validateProperties()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\Group.as:864]
at mx.managers::LayoutManager/validateProperties()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\LayoutManager.as:597]
at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\LayoutManager.as:783]
at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\LayoutManager.as:1180]
我的应用程序中没有“normalAndInactive”状态。我尝试将一个放入我的应用程序中,但没有做任何事情。我究竟做错了什么?
编辑:我发现了更多信息。在调试模式下,错误指向我自定义的背景皮肤,如下:
<?xml version="1.0" encoding="utf-8"?>
<s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:s="library://ns.adobe.com/flex/spark">
<fx:Metadata>
[HostComponent("spark.components.Application")]
</fx:Metadata>
<s:states>
<s:State name="normal" />
<s:State name="disabled" />
</s:states>
<!-- Define a gradient fill for the background of the Application container. -->
<s:Rect id="backgroundRect" left="0" right="0" top="0" bottom="0">
<s:fill>
<s:SolidColor color="#FFFFFF" alpha=".25" />
</s:fill>
</s:Rect>
<s:Group id="contentGroup" left="0" right="0" top="0" bottom="0" />
</s:Skin>