PureMVC Architects Lounge

PureMVC Manifold => Bug Report => Topic started by: puremvc on February 28, 2010, 04:14:34



Title: Facade.getInstance needs to return IFacade
Post by: puremvc on February 28, 2010, 04:14:34
Currently it returns a Facade. This keeps you from being able to do:

:
/**
* get the instance.
* @return the singleton
*/
public static HelloWorldFacade getInstance( String key ) {
if (instance == null) {
instance = new HelloWorldFacade( key );
}
return instance;
}

...as you should in your concrete Facade subclass.

This why was it implemented to return the class instead of the interface? Are there other places where the AS3 reference methods return an interface but you return instead a class? It might be a good time to investigate when you make this change.

-=Cliff>