|
|
Show Posts
|
Pages: [1]
|
2
|
Announcements and General Discussion / Architecture / Interfaces
|
on: June 25, 2008, 07:33:43
|
Hi, I notice in some examples, some implements interface and some don't (i.e. in FlickerGallery demo it only declares "public class ApplicationFacade extends Facade", while in HelloWorld demo is declares "public class ApplicationFacade extends Facade implements IFacade" ... I know the best practice is to program to Interface .. or is not declaring "implement InterfaceName" just a lazy way to do it even though it will work?
Thanks
|
|
|
3
|
Announcements and General Discussion / Getting Started / Newbie : AS2 implementation trouble
|
on: June 10, 2008, 12:34:36
|
Hi,
I'm trying to use AS3 examples around as a guide for a AS2 implementation (for another application). But I'm having some problems:
import org.puremvc.as2.patterns.facade.Facade; import org.puremvc.as2.interfaces.IFacade; import org.puremvc.as2.patterns.observer.Notification; import CamScript; class CamScript.ApplicationFacade {
// Notification name constants public static var STARTUP:String = "startup"; private static var instance; /** * Singleton ApplicationFacade factory method */ public static function getInstance():ApplicationFacade { if ( instance == null ) instance = new ApplicationFacade(); return ApplicationFacade(instance); }
public function startup( app:CamScript ) : Void { notifyObservers( new Notification( STARTUP, app ) ); } /** * Register Commands with the Controller */ function initializeController():Void { super.initializeController(); // registerCommand( STARTUP, StartupCommand ); } } some Question(s):
1. return ApplicationFacade(instance); // Did i type cast this correct? 2. There is no method with the name 'notifyObservers'.
|
|
|
|
|