My events are being dispatched but nothing is happening? Do they have scope?
I have a flex app under construction that makes use of a lot of . I have a main module that has child modules. Ugh, I know. in one of these sub-modules, i want to know if i click a button. The handler for that button-click resides "higher" up in the app. I added an eventlistener looki开发者_开发百科ng for the event that I dispatch down in the sub-module, but no-go. Am I doing something wrong or is there a scope problem or something?
I know this is kinda vague, but I don't really know how to even debug this one, frankly.
Thanks in advance and be gentle. :)
Where do you add the event listener? If you add it not directly to the object that dispatches the event but further up then you need to make sure your event bubbles. Try
dispatchEvent(new Event(YOUR_EVENT_ID), true)
And check this page on event propagation.
Are you declaring the events that child dispatches? i.e.
[Event(name="eventName", type="eventType")]
精彩评论