PureMVC Architects Lounge

PureMVC Manifold => Bug Report => Topic started by: jinni_cao on June 02, 2008, 07:20:32



Title: [ADDED] Suggestion: Add static function hasCore() to Facade
Post by: jinni_cao on June 02, 2008, 07:20:32
Hi Cliff,

     I've been working with PureMVC framework for a while. Thanks for your wonderful works.
     Today I ran into a problem that there is no API to decide whether an instance of Facade with specific key exists without creating new one.
     So I suggest to add a simple hasCore (static) function to Facade class of PureMVC Multicore version:

               /**
       * @param multitonKey of the Core to remove
       */      
      public static function hasCore(key:String):Boolean {
         return instanceMap[ key ] != null;
      }

     Does it make sense?
     Or we have better way to do that?

     Thanks!

Jinni


Title: Re: Suggestion: Add static function hasCore() to Facade
Post by: puremvc on June 02, 2008, 12:19:01
I'm with you. I just ported the framework  unit tests and realized there was no way to reasonably test removeCore without a hasCore method. Consider it on the list. :)

-=Cliff> 


Title: Re: Suggestion: Add static function hasCore() to Facade
Post by: puremvc on April 06, 2009, 03:50:19
Again, sorry I forgot to mention this bug was fixed in 1.0.5.
-=Cliff>