Flex 3 PopUpMenuButton 和 ReferenceError #1069
我在 Flex 3 应用程序中有一个 PopUpMenuButton。如果有人点击下拉部分,它就可以正常工作。但是,如果他们点击主按钮部分,我就会得到 获取引用错误:错误#1069。用户消除错误后,它就会执行其应该执行的操作。
<mx:PopUpMenuButton
id="myPopUpMenuButton2"
label="Flip"
labelField="@label"
dataProvider="{myList2}"
itemClick="popUpMenuButtonClickHandler2(event);flipperPhotoSearcher1(event.item.@neigborhoodNum, event.item.@imageSeries);"
click="defaultpopUpMenuButtonClickHandler2()"
/>
public function popUpMenuButtonClickHandler2(event:MenuEvent):void {
mainViewStack.selectedChild = this[event.item.@chosen];
myPopUpMenuButton2.label = event.item.@label;
neighborhoodPopUpMenuButton.label = "Neighborhoods";
}
public function defaultpopUpMenuButtonClickHandler2():void {
mainViewStack.selectedChild = home;
myPopUpMenuButton2.label = 'Adams Morgan';
flipperPhotoSearcher1(2,1);
neighborhoodPopUpMenuButton.label = "Neighborhoods";
}
关于我做错了什么有什么想法吗?
谢谢。
-拉克斯米迪
I've got a PopUpMenuButton in a Flex 3 application. If someone clicks on the pulldown part, it works fine. But, if they click on the main button part, I get
get ReferenceError: Error #1069. After the user dismisses the error, it then does what it's supposed to do.
<mx:PopUpMenuButton
id="myPopUpMenuButton2"
label="Flip"
labelField="@label"
dataProvider="{myList2}"
itemClick="popUpMenuButtonClickHandler2(event);flipperPhotoSearcher1(event.item.@neigborhoodNum, event.item.@imageSeries);"
click="defaultpopUpMenuButtonClickHandler2()"
/>
public function popUpMenuButtonClickHandler2(event:MenuEvent):void {
mainViewStack.selectedChild = this[event.item.@chosen];
myPopUpMenuButton2.label = event.item.@label;
neighborhoodPopUpMenuButton.label = "Neighborhoods";
}
public function defaultpopUpMenuButtonClickHandler2():void {
mainViewStack.selectedChild = home;
myPopUpMenuButton2.label = 'Adams Morgan';
flipperPhotoSearcher1(2,1);
neighborhoodPopUpMenuButton.label = "Neighborhoods";
}
Any ideas as to what I'm doing wrong?
Thank you.
-Laxmidi
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在代码的 MXML 部分中,单击处理程序必须传递一个事件参数,就像 itemClick 事件处理程序一样。
但您的处理程序应该接收 MouseEvent 类型的事件,而不是 ItemClick。
天气
null
是否通过。In the MXML portion of your code, the click handler must pass an event argument just like the itemClick event handler has.
but your handler should receive the event as a MouseEvent type, not ItemClick.
weather
null
is passed or not.