Rotem Hadary
Rotem Hadary

Reputation:

flash MenuBar component bug

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?

Upvotes: 0

Views: 549

Answers (1)

debuck
debuck

Reputation: 11

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.

Upvotes: 1

Related Questions