-
16 Jan 2013 12:03 PM #1
this.$namespace not handling deep namespaces in Ext.app.Application
this.$namespace not handling deep namespaces in Ext.app.Application
I have an application with the name set as "Yada.yada" i.e.,:
however in the code use in getView, getModel and getStore the this.$namespace property returns "YADA" meaning that it won't create views etc.Code:new Ext.app.Application({ name: "YADA.yada" });
It might be the funky way I'm trying to use Ext.app.Application - however it always used to work (and was working in the earlier 4.2 beta). Seems all the changes to the MVC system have broken my use case. I have a workaround (overriding Ext.app.Application and forcing this.$namespace to be correct).Code:Ext.app.Controller.getFullName(name, 'store', this.$namespace);
CTO @ Xero - Beautiful Accounting Software (http://xero.com/)
-
16 Jan 2013 1:15 PM #2
Hi Craig,
Hmm, that one's interesting. You see, $namespace property holds Controller (and Application, too) namespace that should have been resolved at class creation time. If it gets incorrect value, it means namespace resolution is broken somehow. I'm not sure exactly what sort of funky you're doing, and I can't reproduce this in my setup. Can you show me more code please?
Regards,
Alex.
-
16 Jan 2013 2:49 PM #3
Did you try anything other than Controllers? For controllers it works out of the box. For views it doesn't. Case in point - trying to create the Viewport (YADA.yada.view.Viewport) - it would try to create YADA.view.Viewport - it would drop off every other part of the namespace. Seems to be something weird going on in the onClassExtended process.
CTO @ Xero - Beautiful Accounting Software (http://xero.com/)
-
16 Jan 2013 4:57 PM #4
I used the simplest form:
Besides YADA.yada.controller.Foo, there are two view classes: YADA.yada.view.Viewport and YADA.yada.view.Bar that gets displayed in the viewport. All class names get resolved correctly, that's why I'm asking you to give me some more clue.Code:Ext.application({ name: 'YADA.yada', appFolder: 'yada', controllers: ['Foo'], autoCreateViewport: true });
Regards,
Alex.


Reply With Quote