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 / Architecture / Suggestion to "as YXZProxy" casting on: February 16, 2010, 10:07:22
Hi there,

I've got a suggestion for the usage of the "as" casting in the as3 port. It's not really useful to do so. It makes it worst to debug the code.

Using this:

:
var userProxy:UserProxy = facade.retrieveProxy(UserProxy.NAME) as UserProxy;

and getting a NULL return of any reason will effect your code at another position in the code. That makes it harder to debug while the debugger jumps to the wrong position in the Code.


I would rather recommend using this:

:
var userProxy:UserProxy = UserProxy(facade.retrieveProxy(UserProxy.NAME));

then the player is immediately throwing an exception at the right position in the stack and not when the userProxy is used later in the code.


Cheers
Pages: [1]