加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

FLEX ERROR

发布时间:2020-12-15 04:26:16 所属栏目:百科 来源:网络整理
导读:Child elements specifying default property value must be contiguous 分析:FlashBuilder4的MXML文件上,不能把fx:Script.../fx:Script标签放在其它标签中间,如: ? ? s:Button label="aaa"/ ? ? ? fx:Script ? ? ? ? ? ![CDATA[? ? ? ? ? ? ? protected
Child elements specifying default property value must be contiguous

分析:FlashBuilder4的MXML文件上,不能把<fx:Script>...</fx:Script>标签放在其它标签中间,如:
? ? <s:Button label="aaa"/> ?
? ? <fx:Script> ?
? ? ? ? <![CDATA[?
? ? ? ? ? ? protected function button1_clickHandler(event:MouseEvent):void ?
? ? ? ? ? ? { ?
? ? ? ? ? ? ? ? txt.text ="的确很有flash的风范啊,难怪给改叫FlashBuilder";?
? ? ? ? ? ? }?
? ? ? ? ]]> ?
? ? </fx:Script>?
? ? <org:FormPanel id="a1" isClickable="true" isClose="false" layout="vertical" > ?
? ? ? ? <s:Button label="HAHA" click="button1_clickHandler(event)"/> ?
? ? ? ? <mx:Label id="txt" text="速度好像快了很多啊" x="3" y="26"/> ?
? ? </org:FormPanel> ?


ArgumentError: Error #1063: Argument count mismatch Expected 0,got 1.


?I received this error when an event handler I created did not contain an expected parameter. Somehow the compiler missed it but an error was thrown in the browser. The fix was easy. I forgot to add in the event object. Adding that in fixed the problem.

? ? ? ? ? import flash.events.MouseEvent;
? ? ? ? directorySearch_txt.addEventListener(FocusEvent.FOCUS_OUT,directoryFocusOut);?
????????? // this line generated no errors in flex but generated errors at run time?
????????? public function directoryFocusOut():void {?
?????????????? // do something????
????????? }?
????????? // adding the event object cleared the error?
????????? public function directoryFocusOut( event:FocusEvent):void {? ?????????????? // do something???? ????????? } ?

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读