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  PureMVC Manifold / Standard Version / Re: RetrieveProxy Returning NULL on: April 19, 2008, 05:04:26
Rhysyngsun, Thanks, that's exactly what I was missing! Now it's working perfectly.

puremvc, Thanks for the pointer. Glad to know I'm not going insane ;)
2  PureMVC Manifold / Standard Version / Re: RetrieveProxy Returning NULL on: April 19, 2008, 02:01:12
Yes, I'm definitely using the Standard version. I'm also sure WorldProxy.NAME is defined in my WorldProxy.as like:

      public static const NAME:String = "WorldProxy"

Unfortunately, I'm using Flex Builder Alpha on Linux, and I think the debugger is one of many features that don't work yet.

Just to get a feel for how the proxy is registered, I replaced registerProxy in the standard Model.as with:

      public function registerProxy( proxy:IProxy ) : void
      {
         trace('model.registerProxy:'+proxy)
         trace('model.registerProxy.proxyMap.length.before:'+proxyMap.length)
         trace('model.registerProxy.proxyName():'+proxy.getProxyName())
         proxyMap[ proxy.getProxyName() ] = proxy;
         trace('model.registerProxy.proxyMap.length.after:'+proxyMap.length)
         proxy.onRegister();
      }

And this is the output I get:

model.registerProxy:[object WorldProxy]
model.registerProxy.proxyMap.length.before:0
model.registerProxy.proxyName():Proxy
model.registerProxy.proxyMap.length.after:0

I can't begin to explain my surprise at how proxyMap has the same length, even though a value was added, or how the proxy name is incorrect. Could this be a bug in mxmlc?
3  Announcements and General Discussion / Public Demos, Tools and Applications / Re: Renju - Flex board game built with the PureMVC framework. on: April 19, 2008, 01:23:49
Thanks for the post. Just to clarify, it's not actually Flex, just AS3. It's very impressive.
4  PureMVC Manifold / Standard Version / Re: RetrieveProxy Returning NULL on: April 19, 2008, 11:40:35
I tried moving around the call to retrieveProxy, and it returns NULL regardless of what class, constructor, or function it's called from.
5  PureMVC Manifold / Standard Version / RetrieveProxy Returning NULL on: April 19, 2008, 11:09:10
Hi,

I'm trying to get started on a simple PureMVC app with version 2.0.3. I have a startup command that registers a proxy and mediator via:

facade.registerProxy( new WorldProxy() );
facade.registerMediator( new ApplicationMediator( main ) );

The ApplicationMediator further registers a MenuMediator:

facade.registerMediator( new MenuMediator(menuSprite) );

The problem is that in the MenuMediator, I'm unable to retrieve my WorldProxy, like:

proxy = facade.retrieveProxy( WorldProxy.NAME ) as WorldProxy;
trace('proxy:'+proxy)

The trace shows that proxy is NULL. How can this be if I've registered the proxy?

Pages: [1]