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

mx.controls.MenuBar#getMenuAt TypeError

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Apache Flex 4.9.0
    • Fix Version/s: Apache Flex 4.10.0
    • Component/s: mx: Menu Bar
    • Labels:
      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

            • Assignee:
              Unassigned
              Reporter:
              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