`
yr512656630
  • 浏览: 321477 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

unable to bind to property on class (class is not an IEventDispatcher)

    博客分类:
  • flex
 
阅读更多
最初写法

<mx:List id="allActsList"
						 width="100%"
						 height="100%"
						 dragEnabled="true"
						 dropEnabled="true"
						 dragMoveEnabled="true"
						 allowMultipleSelection="true"
						 doubleClickEnabled="true"
						 dataProvider="{allActs}"
						 doubleClick="relateActs(allActsList.selectedItems, allActs, execActs);"
						 alpha="0.7"
						 showDataTips="true"
						 dataTipFunction="dataTipFunction"
						 alternatingItemColors="[0xF7F7F7, 0xFFFFFF]">
					<mx:itemRenderer>
						<mx:Component>
							<mx:HBox horizontalScrollPolicy="off"
									 width="100%"
									 fontSize="12"
									 paddingTop="0"
									 paddingBottom="0"
									 horizontalAlign="left">
								<mx:Label text="{data.scheduleName}"
										  width="90%"
										  paddingLeft="0"/>
								<mx:Button label="修改"
										   width="10%"
										   click="outerDocument.updateActHandler()"/>
							</mx:HBox>
						</mx:Component>
					</mx:itemRenderer>
				</mx:List>



修改后写法

<mx:List id="allActsList"
						 width="100%"
						 height="100%"
						 dragEnabled="true"
						 dropEnabled="true"
						 dragMoveEnabled="true"
						 allowMultipleSelection="true"
						 doubleClickEnabled="true"
						 dataProvider="{allActs}"
						 doubleClick="relateActs(allActsList.selectedItems, allActs, execActs);"
						 alpha="0.7"
						 showDataTips="true"
						 dataTipFunction="dataTipFunction"
						 alternatingItemColors="[0xF7F7F7, 0xFFFFFF]">
					<mx:itemRenderer>
						<mx:Component>
							<mx:HBox horizontalScrollPolicy="off"
									 width="100%"
									 fontSize="12"
									 paddingTop="0"
									 paddingBottom="0"
									 horizontalAlign="left">
								<mx:Script>
									<![CDATA[
										override public function set data(value:Object):void
										{
											super.data=value;
											scheduleTxt.text=value.scheduleName.toString();
										}
									]]>
								</mx:Script>
								<mx:Label id="scheduleTxt"
										  width="90%"
										  paddingLeft="0"/>
								<mx:Button label="修改"
										   width="10%"
										   click="outerDocument.updateActHandler()"/>
							</mx:HBox>
						</mx:Component>
					</mx:itemRenderer>
				</mx:List>


覆盖data方法后不在报警告
分享到:
评论
1 楼 grofis 2013-10-08  
你他妈真是个大傻逼啊。。。。这个东西写出来之后你也不看了吧

相关推荐

Global site tag (gtag.js) - Google Analytics