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

Calling menu.hide() on sub-menu of MenuBar results in exception on next click of menubar root item

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • Adobe Flex SDK 3.1 (Release)
    • None
    • mx: Menu, mx: Menu Bar
    • None
    • Affected OS(s): Windows
      Affected OS(s): Windows XP
      Language Found: English

    Description

      I have a MenuBar with the following data within it

      ROOT
      --CHILD1
      ----SubChild1-1
      ----SubChild1-2
      ----SubChild1-3
      --CHILD2
      --CHILD3
      ROOT2
      ROOT3

      When the mouse exits any Menu I execute a "menu.hide()" and the drop down menu disappears. When I click again on ROOT1 the menu shows again OK. I am detecting this by an item rollout event and detecting the mouse position relative to the menu box boundaries.

      This works fine when the menu data does not contain more than one level of children (i.e. no more than Child1, Child2 and Child3). However ONCE I introduce a second level of children (subchild1-1 etc) the MenuBar seems to break.

      For example, when the "subchild1-1, 1-2, 1-3" menu displays, when the mouse exits that menu I properly call "menu.parentMenu.hide()". However once I click again on ROOT1 I get the following error below. My question is why does calling menu.hide() when in context of a sub-menu, does the menubar break like this? Is there some state other than menu.hide() I must reset that is not documented?

      RangeError: Error #2006: The supplied index is out of bounds.
      at flash.display::DisplayObjectContainer/addChildAt()
      at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::rawChildren_addChildAt()[/Applications/Adobe Flex Builder 3 Plug-in/sdks/3.1.0/frameworks/projects/framework/src/mx/managers/SystemManager.as:1687]
      at mx.managers::SystemManager/addChild()[/Applications/Adobe Flex Builder 3 Plug-in/sdks/3.1.0/frameworks/projects/framework/src/mx/managers/SystemManager.as:1225]
      at mx.managers::PopUpManagerImpl/addPopUp()[/Applications/Adobe Flex Builder 3 Plug-in/sdks/3.1.0/frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as:263]
      at mx.managers::PopUpManager$/addPopUp()[/Applications/Adobe Flex Builder 3 Plug-in/sdks/3.1.0/frameworks/projects/framework/src/mx/managers/PopUpManager.as:169]
      at mx.controls::Menu/show()[/Applications/Adobe Flex Builder 3 Plug-in/sdks/3.1.0/frameworks/projects/framework/src/mx/controls/Menu.as:1406]
      at mx.controls::MenuBar/showMenu()[/Applications/Adobe Flex Builder 3 Plug-in/sdks/3.1.0/frameworks/projects/framework/src/mx/controls/MenuBar.as:1664]
      at mx.controls::MenuBar/mouseOverHandler()[/Applications/Adobe Flex Builder 3 Plug-in/sdks/3.1.0/frameworks/projects/framework/src/mx/controls/MenuBar.as:1756]

      Attachments

        Activity

          People

            adobejira Adobe JIRA
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: