Title: Registering and retrieving a proxy Post by: mikebritton on January 21, 2012, 01:34:42 Can't seem to retrieve my proxy once I've registered it:
var facade = Facade.getInstance('ApplicationFacade'); Then elsewhere, after StroyProxy's onRegister fires: var prox = facade.retrieveProxy(StoryProxy.NAME); My proxy (probably where the problem is): function StoryProxy(name, component) { Thanks in advance! Title: Re: Registering and retrieving a proxy Post by: davidfoley on January 22, 2012, 10:51:43 Hi Mike,
this is pretty straightforward- I think you may have just overlooked calling the Proxy super constructor properly. Rather than function StoryProxy(name, component) { tryfunction StoryProxy(name, component) { Its easy to overlook, but when invoking super constructors with call or apply, just remember to pass in an instance of the subclass the first argument. Note that you can use apply to invoke a super constructor without having to define specific arguments.function StoryProxy () Hope this works for you. https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/apply (https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/apply) |