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

CursorManager.hideCursor and showCursor throw an exception.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Adobe Flex SDK Previous
    • Adobe Flex SDK Previous
    • Cursor Manager
    • None
    • Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Language Found: English

    Description

      (Apollo:Application isn't the exact 'Feature' - but the closest related one listed)

      Reproduction:

      <?xml version="1.0" encoding="utf-8"?>
      <mx:ApolloApplication xmlns:mx="http://www.adobe.com/2006/mxml"
      layout="vertical"
      mouseDown="onMouseDown(event)"
      backgroundColor="0x003030"
      focusRect="false">
      <mx:Script>
      <![CDATA[
      import mx.managers.CursorManager;

      private var _mouseHidden:Boolean = false;

      private function onMouseDown(event:MouseEvent):void
      {
      try {
      _mouseHidden = !_mouseHidden;
      if (_mouseHidden)

      { CursorManager.hideCursor(); }

      else

      { CursorManager.showCursor(); }

      }
      catch(e:Error)

      { trace(e); trace(e.getStackTrace()) }

      }
      ]]
      >
      </mx:Script>
      </mx:ApolloApplication>

      Actual Results: an exception is thrown on both hide- and showCursor calls. The mouse cursor is not being hidded / shown:

      TypeError: Error #1009: Cannot access a property or method of a null object reference.
      at mx.managers::CursorManagerImpl/hideCursor()[C:\dev\flex_201_ja\sdk\frameworks\mx\managers\CursorManagerImpl.as:268]
      at mx.managers::CursorManager$/hideCursor()[C:\dev\flex_201_ja\sdk\frameworks\mx\managers\CursorManager.as:178]
      ...

      TypeError: Error #1009: Cannot access a property or method of a null object reference.
      at mx.managers::CursorManagerImpl/showCursor()[C:\dev\flex_201_ja\sdk\frameworks\mx\managers\CursorManagerImpl.as:256]
      at mx.managers::CursorManager$/showCursor()[C:\dev\flex_201_ja\sdk\frameworks\mx\managers\CursorManager.as:166]
      ...

      Expected Results: mouse cursor should be toggled visible and invisible on repeadetly clicking the stage.

      Workaround: none

      Platform: found on Mac, similar behavior suspected on Windows.

      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: