apache-flexactionscript-3mate

Mate not listening to events - Flex


I am working on a simple project involving flex 4 and Mate framework. When I am including Mate event map in fx:declarations tag in mxml file, and when I fire up an event, Mate event handlers listen to events and act upon it.

The issue is this, in action script based project, when I instantiate the eventmap class(this is in mxml file only) and keep it in top and fireup an event, instantiated eventmap is not listening to event fired up from action script class.

What do you think is going wrong?

Thanks in advance.


Solution

  • For some reason, the events dispatched by actionscript classes cannot be listened to by Mate event handlers.

    To ensure, event handlers definitely receive events appropriately, we should make use of the class defined in mate called, com.asfusion.mate.events.Dispatcher. we just need to instantiate and dispatch an event with this class.