Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Apache Flex 4.9.0
-
None
Description
When changing MenuBar dataProvider within click on MenuBar-Item causes a RangeError in getMenuAt if the index was greater then new amount of MenuBar Items.
I solved this with following workaround:
public override function getMenuAt(index:int):Menu
{
var menu:Menu = null;
try
{ menu = super.getMenuAt(index); } catch(e: Error)
{
}
if(menu == null) //return a fake menu to avoid TypeError's
return new Menu();
else
return menu;
}