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

Show Posts

* | |

  Show Posts
Pages: [1]
1  Announcements and General Discussion / Getting Started / Re: facade has proxy but it is null on: November 18, 2008, 08:08:29
Am also doing the same thing. My facade has the Command --> Proxy registered correctly. But while retrieving the proxy in the Test code, it's coming as null always. Any idea?

In Test case
==========
import com.blah.testapp.ApplicationFacade;
import com.blah.testapp.model.StockQuoteProxy;

var testAppProxy:TestAppProxy = TestApp.facade.retrieveProxy(TestAppProxy.NAME) as TestAppProxy;

App has the following
================
TestApp.mxml:
public static const NAME:String = 'TestApp';
public static var facade:ApplicationFacade = ApplicationFacade.getInstance(NAME);
   private function onCreationComplete() : void
   {
       facade.startup(this);
   }


Facade:
      override protected function initializeController() : void {
         super.initializeController();
          registerCommand(Notification.TEST_APP_COMMAND, TestAppCommand);
      }

Command:
        var testAppProxy:TestAppProxy =
         facade.retrieveProxy(TestAppProxy.NAME) as TestAppProxy;
         if (testAppProxy == null) {
            facade.registerProxy(testAppProxy = new TestAppProxy());
         }
Pages: [1]