We Recommend

Version Control with Subversion Version Control with Subversion
Written by members of the Subversion open source development team, Version Control with Subversion introduces the powerful new versioning tool designed to be the successor to the Concurrent Version System or CVS. CVS users will find the "look and feel" Subversion comfortably familiar, but under the surface it's far more flexible, robust, and usable, and more importantly, it improves on CVS's more notable flaws.


Posted By

wintondeshong on 05/01/08


Tagged

class textmate actionscript3 PureMVC facade


Versions (?)


Who likes this?

2 people have marked this snippet as a favorite

vickyvamp
n00ge


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.