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

Using the Menu control to close a Window

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Adobe Flex SDK 3.3 (Release)
    • None
    • mx: Window
    • None
    • Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Browser: Internet Explorer 7.x
      Language Found: English

    Description

      Steps to reproduce:
      1. Create a class that extends Window and place a Menu control in it.
      2. Create a File Menu with a menu item named exit and use the itemClick Event to call close function on the window
      3. add a button somewhere in your application to create an instance of that window then call the open function.
      4. run.

      Actual Results:
      TypeError: Error #1009: Cannot access a property or method of a null object reference.
      at mx.core::Window/get visible()[C:\autobuild\3.3.0\frameworks\projects\airframework\src\mx\core\Window.as:898]

      Expected Results:
      The window to close.

      Workaround (if any):
      using the callLater method to execute the window's close function so that it is called after the Menu class hides the menu.

      Notes:
      In the menu class ~ line 1639 is the mouseUpHandler which dispaches the itemClick event then attempts to hide the menu.

      when the itemClick event is dispatched, the windows close function is called which sets _nativeWindow variable to null.

      after that happens, the menu tries to hide all menus which causes it to dispatch a hide event which in turn causes a chain reaction of methods to be called in the FocusManager then the WindowedSystemManager. eventually it attemps to access get visible function on line 895 of the Window class. and throws an exception on line 898 _nativeWindow.visible.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: