Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: [ADDED] Suggestion: Add static function hasCore() to Facade  (Read 9296 times)
jinni_cao
Newbie
*
Posts: 1


View Profile Email
« 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
« Last Edit: April 06, 2009, 03:50:49 by puremvc » Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 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> 
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #2 on: April 06, 2009, 03:50:19 »

Again, sorry I forgot to mention this bug was fixed in 1.0.5.
-=Cliff>
Logged
Pages: [1]
Print