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

Custom bindSetters on the selected attributes of a Checkbox have multiple executions per change.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Adobe Flex SDK 3.2 (Release)
    • None
    • None
    • Affected OS(s): All OS Platforms
      Browser: Firefox 3.x
      Language Found: English

    Description

      Steps to reproduce:

      Specify a bindSetter on a checkbox's selected attribute (regardless of commitOnly param)
      <mx:Script>
      <![CDATA[

      import mx.controls.Alert;
      import mx.binding.utils.BindingUtils;

      public function setBinding():void

      { BindingUtils.bindSetter(setter, binding_test, "selected") //same results as if true param is sent for commitOnly }

      public function setter(testValue:Object):void

      { Alert.show("setter getting called") }

      ]]
      >
      </mx:Script>

      <mx:HBox>
      <mx:CheckBox id="binding_test" >

      </mx:CheckBox>

      <mx:Button click="setBinding()">

      </mx:Button>
      </mx:HBox>

      Actual Results:
      the "setter" function get's called twice when the checkbox has a change.

      Expected Results:
      It should only be called once.

      Workaround (if any):
      maintain state somewhere, perhaps in a static var and use the "setter" execution that reflects the changed checkbox.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: