We Recommend

SQL Cookbook SQL Cookbook
Written in O'Reilly's popular Problem/Solution/Discussion style, the SQL Cookbook is sure to please. Anthony's credo is: "When it comes down to it, we all go to work, we all have bills to pay, and we all want to go home at a reasonable time and enjoy what's still available of our days." The SQL Cookbook moves quickly from problem to solution, saving you time each step of the way.


Posted By

wintondeshong on 05/02/08


Tagged

textmate actionscript3 PureMVC SimpleCommand


Versions (?)


PureMVC StartupCommand Class Template


Published in: Other 


  1. /**
  2. * Base PureMVC Project
  3. */
  4. package controller
  5. {
  6. import flash.display.Stage;
  7. import org.puremvc.as3.interfaces.ICommand;
  8. import org.puremvc.as3.interfaces.INotification;
  9. import org.puremvc.as3.patterns.command.SimpleCommand;
  10.  
  11. import ApplicationFacade;
  12. import view.StageMediator;
  13.  
  14.  
  15. /**
  16. * Simple StartupCommand for PureMVC Structured Project
  17. */
  18. public class StartupCommand extends SimpleCommand implements ICommand
  19. {
  20. override public function execute( note:INotification ) : void
  21. {
  22. /**
  23. * Get the View Components for the Mediators from the app,
  24. * which passed a reference to itself on the notification.
  25. */
  26. var stage:Stage = note.getBody() as Stage;
  27.  
  28. facade.registerMediator( new StageMediator( stage ) );
  29. }
  30. }
  31. }

Report this snippet 

You need to login to post a comment.