Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I would start by trying to set the <code>bubbles</code> parameter to true. So, dispatch the event like so:</p> <pre><code>dispatchEvent(new Event(Event.CHANGE, true)); </code></pre> <p>This will keep you from having to listen to the event explicitly on the dispatcher and will allow the event to be captured in the bubbling phase. </p> <p><strong>EDIT</strong><br> This <strong>IS NOT</strong> the end-all, be-all answer... and you will likely want to remove the bubbles = True once you get it working correctly, unless you want to explicitly cancel the event after you capture it. The reason being is the Event.CHANGE event is a pretty common one, and bubbling that event up the Display List chain could be messy, especially if there are other handlers listening for CHANGE events. But, it <em>WILL</em> let you know whether you are attaching your listener correctly.<br> <strong>END EDIT</strong> </p> <p>The other thing you might want to try (since it is not apparent from the way you have your code written above) is to add the event listener immediately after creation of the instance. Alse, make sure your _biosModel is an instance property, not defined within the scope of some function that generates it.</p> <pre><code>package ... { import flash.events.Event; public class Something extends SomethingElse { var _biosModel:IMultiDataModel; public function Something() { this._biosModel = new BiosPanelModel(); this._biosModel.addEventListener(Event.CHANGE, __eventHandler); } private function __eventHandler($evt:Event) { trace("SUCCESS"); } } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload