Flash MenuBar 组件错误

发布于 2024-07-17 07:20:47 字数 123 浏览 4 评论 0原文

更新菜单栏组件的数据提供程序时,菜单项的状态无法更新,直到用户与菜单交互(将鼠标滚动到菜单上、单击菜单项等)。 例如,禁用的项目将保持启用状态,直到用户将鼠标悬停在其上。 有没有办法在修改数据提供者 XML 后强制菜单“刷新”?

When updating the data provider for a menu bar component, the state of the menu items fails to update until the user interacts with the menus (rolls the mouse over them, clicks them, etc). For example, a disabled item remains enabled until the user roll the mouse over it. Is there a way to force a menu 'refresh' after modifying the data provider XML?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

很酷又爱笑 2024-07-24 07:20:47

刚刚经历了完全相同的事情。 要发生此问题,您必须在更新 dataProvider 之前在菜单上选择某些内容。 此选择索引停留在内部成员 oldIndex 上,并导致菜单栏 mouseOverHandler 中出现错误。 我通过更改 dataProvider 后清除选择来修复它:

menu.dataProvider = newProvider;
appMenu.selectedIndex = -1;

祝你好运。

Just experienced exactly the same thing. For the problem to occur, you must've selected something on menu prior to updating dataProvider. this selection index lingers on internal member oldIndex and causes an error in menubar mouseOverHandler. I fixed it by clearing selection after changing dataProvider:

menu.dataProvider = newProvider;
appMenu.selectedIndex = -1;

Good luck.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文