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

NativeMenuItem.checked reports opposite of actual value (what's true is false, what's false is true)

    XMLWordPrintableJSON

Details

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

    Description

      Steps to reproduce:
      1. Create a new Flex/AIR project with the following code
      <?xml version="1.0" encoding="utf-8"?>
      <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init()" layout="absolute">
      <mx:Script>
      <![CDATA[
      public function init():void

      { var n:NativeMenuItem = new NativeMenuItem(); trace(n.checked); n.checked = false; trace(n.checked); n.checked = true; trace(n.checked); n.checked = !n.checked trace(n.checked); n.checked = n.checked trace(n.checked); }

      ]]
      >
      </mx:Script>
      </mx:WindowedApplication>

      Actual Results:
      true
      true
      false
      false
      true

      Expected Results:
      false
      false
      true
      false
      false

      Workaround (if any):
      As a temporary work around, one may replace instances of "checked" with "!checked" and "!checked" with "checked", but this should be fixed in the source code.

      For instance, to change the checked value to it's opposite value, one would normally use n.checked = !n.checked, but instead, you will have to use n.checked = n.checked.

      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: