warning: unable to bind to property '' on class 'Object' (class is not an IEventDispatcher)
来源:互联网 发布:普通收据打印软件 编辑:程序博客网 时间:2024/06/10 02:37
这个是在bindable经常会碰到的警告,虽然是警告.但也要弄清楚.
These warnings are there because if you have some code that modifies the individual fields of selectedItem, the binding mechanism will not be able to detect them. A better way to write this would be to create separate variables for the two values:
<?xml version="1.0"?>
<!-- Simple example to demonstrate the ComboBox control. --> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
[Bindable]
public var cards: Array = [ {label:"Visa", data:1},
{label:"MasterCard", data:2}, {label:"American Express", data:3} ];
[Bindable]
public var selectedItemLabel:String = "";
[Bindable]
public var selectedItemData:String = "";
private function closeHandler(event:Event):void
{
selectedItemLabel=ComboBox(event.target).selectedItem.label;
selectedItemData=ComboBox(event.target).selectedItem.data;
}
]]>
</mx:Script>
<mx:Panel title="ComboBox Control Example"
height="75%" width="75%" layout="horizontal"
paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10">
<mx:ComboBox dataProvider="{cards}" width="150"
close="closeHandler(event);"/>
<mx:VBox width="250">
<mx:Text width="200" color="blue" text="Select a type of credit card."/>
<mx:Label text="You selected: {selectedItemLabel}"/>
<mx:Label text="Data: {selectedItemData}"/>
</mx:VBox>
</mx:Panel>
</mx:Application>
转载:http://blog.csdn.net/songhuanren/article/details/1708545
- warning: unable to bind to property '' on class 'Object' (class is not an IEventDispatcher)
- warning: unable to bind to property '' on class 'Object' (class is not an IEventDispatcher)
- Flex warning: unable to bind to property 'name' on class 'Object' (class is not an IEventDispatcher)
- warning: unable to bind to property '' on class '' (class is not an IEventDispatcher)
- 解决此类问题:warning: unable to bind to property '' on class 'Object' (class is not an IEventDispatcher) .
- unable to bind to property 'money' on class 'Object' (class is not an IEventDispatcher)
- Flex unable to bind to property xxx on class xxx 的问题
- unable to locate a constructor on class ..
- Unable to locate appropriate constructor on class
- Unable to locate appropriate constructor on class
- Unable to instantiate fragment make sure class name exists, is public, and has an empty constructor
- Unable to instantiate fragment make sure class name exists, is public, and has an empty constructor
- Unable to parse template "Class" Error message: This template did not produce a Java class or an int
- object is not an instance of declaring class
- object is not an instance of declaring class 反射异常
- object is not an instance of declaring class 反射异常
- 报错:object is not an instance of declaring class
- hibernate 4 object is not an instance of declaring class
- 尊老爱幼?
- hdu 1029
- 如何将机器学习应用到测试领域
- dojo-散列字面量 数组字面量 函数字面量
- SDK更新時出現的問題 及解決辦法
- warning: unable to bind to property '' on class 'Object' (class is not an IEventDispatcher)
- Listview滚动时出现java.lang.StackOverflowError错误
- 如何对分布式系统进行测试
- netfilter简介
- qt 事务操作
- 我的MyEclipse类文件注释
- struts2<s:iterator>遍历map
- linux shell学习之自动检测并重启httpd服务
- Linux 命令行快捷键 .