如何修复错误Flex [英] How to fix error Flex
本文介绍了如何修复错误Flex的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好!我使用Flex教程中的示例代码:
Hello! I use example code from Flex tutorial:
<?xml version="1.0" encoding="utf-8"?>
<!-- Simple example to demonstrate the Spark DropDownList control -->
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<fx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import spark.events.IndexChangeEvent;
[Bindable]
public var myDP:ArrayCollection = new ArrayCollection(
[ {product:"Flex", price:100},
{product:"Air", price:200},
{product:"Catalyst", price:300},
{product:"FlashBuilder", price:400} ]);
private function updateSelection(e:IndexChangeEvent):void
{
currSel.text = "Current Product = " + myDDL.selectedItem.product;
currPrc.text = "Price = $" + myDDL.selectedItem.price;
}
]]>
</fx:Script>
<s:Panel width="75%" height="75%" title="My DropDownList Example"
horizontalCenter="0" verticalCenter="0">
<s:VGroup left="10" right="10" top="10" bottom="10">
<!-- Text components used to display current selection and price -->
<s:Label id="currSel" text="Current Product = -"/>
<s:Label id="currPrc" text="Price = $ -"/>
<!-- DropDownList will call the updateSelection function when the
selectionChanged event is dispatched -->
<s:DropDownList id="myDDL" prompt="Select One"
width="200" dataProvider="{myDP}"
labelField="product"
change="updateSelection(event);"/>
</s:VGroup>
</s:Panel>
</s:Application>
这给我一个错误:
This get me one error:
Severity and Description Path Resource Location Creation Time Id
Could not resolve <s:Application> to a component implementation. LABAMENU/src LABAMENU.mxml line 4 1370013049718 77
如何解决?可能是我有任何版本的flex?我知道Flex只有3天,并且不会忽略这样的微妙之处
How to fix it? May be i have any version flex? I know Flex only 3 days and dont understanв such such subtleties
推荐答案
+ myDDL.selectedItem.price;
}
]]>
< / fx:脚本 >
< s:面板 width = 75% 高度 = 75% title = 我的DropDownList示例
horizontalCenter = 0 verticalCenter = 0 >
< s:VGroup left = 10 正确 = 10 top = 10 bottom = 10 >
<! - 用于显示当前选择和价格的文本组件 - >
< s:标签 id = currSel text = 当前产品= - / >
< s:标签 id = currPrc text = Price =
" + myDDL.selectedItem.price; } ]]> </fx:Script> <s:Panel width="75%" height="75%" title="My DropDownList Example" horizontalCenter="0" verticalCenter="0"> <s:VGroup left="10" right="10" top="10" bottom="10"> <!-- Text components used to display current selection and price --> <s:Label id="currSel" text="Current Product = -"/> <s:Label id="currPrc" text="Price =
- / > ;
<! - DropDownList将在调度
selectionChanged事件时调用updateSelection函数 - >
< s:DropDownList id = myDDL 提示 = 选择一个
width = 200 dataProvider = {myDP}
labelField = product
更改 = updateSelection(event); / >
< / s:VGroup >
< / s:Panel >
< / s:应用程序 >
-"/> <!-- DropDownList will call the updateSelection function when the selectionChanged event is dispatched --> <s:DropDownList id="myDDL" prompt="Select One" width="200" dataProvider="{myDP}" labelField="product" change="updateSelection(event);"/> </s:VGroup> </s:Panel> </s:Application>
这给我一个错误:
This get me one error:
Severity and Description Path Resource Location Creation Time Id
Could not resolve <s:Application> to a component implementation. LABAMENU/src LABAMENU.mxml line 4 1370013049718 77
如何解决?可能是我有任何版本的flex?我知道Flex仅用了3天而且没有这么细微之处
How to fix it? May be i have any version flex? I know Flex only 3 days and dont understanв such such subtleties
您使用的是哪个版本的flex?使用最新版Flex 4或以上。
Hi,
Which version of flex you are using?use latest version Flex 4 or above.
这篇关于如何修复错误Flex的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文