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/01/08


Tagged

class textmate actionscript3 PureMVC facade


Versions (?)


Who likes this?

1 person has marked this snippet as a favorite

vickyvamp


PureMVC ApplicationFacade Class Template


Published in: Other 


  1. /**
  2. * Base PureMVC Project
  3. */
  4. package {
  5.  
  6. import org.puremvc.as3.interfaces.IFacade;
  7. import org.puremvc.as3.patterns.facade.Facade;
  8. import controller.*;
  9.  
  10. /**
  11. * Simple ApplicationFacade for PureMVC Structured Project
  12. */
  13.  
  14. public class ApplicationFacade extends Facade implements IFacade {
  15.  
  16. /**
  17. * Notification name constants
  18. */
  19. public static const STARTUP:String = "startup";
  20.  
  21. /**
  22. * Singleton ApplicationFacade Factory Method
  23. */
  24. public static function getInstance(): ApplicationFacade {
  25.  
  26. if (instance == null) {
  27. instance = new ApplicationFacade( );
  28. }
  29. return instance as ApplicationFacade;
  30. }
  31.  
  32. /**
  33. * Broadcast the STARTUP Notification
  34. */
  35. public function startup(app:Object):void {
  36. sendNotification( STARTUP, app );
  37. }
  38.  
  39. /**
  40. * Register Commands with the Controller
  41. */
  42. override protected function initializeController():void
  43. {
  44. super.initializeController();
  45.  
  46. registerCommand(STARTUP, StartupCommand);
  47. }
  48. }
  49. }

Report this snippet 

You need to login to post a comment.