Over 10 years of community discussion and knowledge are maintained here as a read-only archive.
// How to get rid of it?import flash.events.Event;//import org.apache.flex.events.Event;public class MyMediator extends Mediator implements IMediator{ public static const NAME:String = 'ApplicationMediator'; public function ApplicationMediator(component:IViewMyView) { super(NAME, component); } override public function onRegister():void { super.onRegister(); view.addEventListener(ApplicationEvents.DO_SOMETHING, onDoSomething); } // How to get rid of Event? private function onDoSomething(event:Event):void { } public function get view():IViewMyView { return viewComponent; }}
// How to get rid of IEventDispatcher?import flash.events.IEventDispatcher;//import org.apache.flex.events.IEventDispatcher;public interface IViewMyView extends IEventDispatcher{ function setData(data:String):void;}
I'd say using the Notifier class which is common to both apps using PureMVC would be a reasonable way to do it