package com {
	
	import com.GameContext;
	
	import org.robotlegs.mvcs.Mediator;
	import org.robotlegs.base.ContextEvent;
		
	public class GameViewMediator extends Mediator {
		
		[Inject]
		public var gameView:GameView;
		
		override public function onRegister():void {
			//Lister for SHUTDOWN event
			eventMap.mapListener(eventDispatcher, ContextEvent.SHUTDOWN, shutdownHandler);
			
			//Dummy Shutdown Dispatch
			dispatch(new ContextEvent(ContextEvent.SHUTDOWN));
		}
		
		private function shutdownHandler(e:ContextEvent):void {
			//How do I trigger the shutdown in the Context from here?
			
			//GameContext.shutdown returns Error: Access of possible undefined property shutdown...
		}
		
	}
	
}