Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-33592

mx.controls.MenuBar#getMenuAt TypeError

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Apache Flex 4.9.0
    • Apache Flex 4.10.0
    • mx: Menu Bar
    • 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;
      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            philipmair Philip Mair
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 2h
                2h
                Remaining:
                Remaining Estimate - 2h
                2h
                Logged:
                Time Spent - Not Specified
                Not Specified