How to dispatch event from application to module in flex

Posted by Viliam Husár on Stack Overflow See other posts from Stack Overflow or by Viliam Husár
Published on 2010-03-29T22:53:05Z Indexed on 2010/03/30 9:23 UTC
Read the original article Hit count: 422

Filed under:
|
|

Is there a way how modules can listen to parent application event? My current solution that works is:

private function directoryRemoteObject_saveCompany_resultHandler(e:ResultEvent):void
{
  this.directoryModuleLoader.child.dispatchEvent(new CompanyEvent(CompanyEvent.COMPANY_SAVED, e.result as int));
}

this means that I need to dispatch event for every module. Isn't there better solution? Thanks.

© Stack Overflow or respective owner

Related posts about flex

Related posts about modules