-
20 Nov 2012 4:20 AM #1
Unanswered: Sencha Cmd app Build (production, testing ...) Ext.create vs xtypes
Unanswered: Sencha Cmd app Build (production, testing ...) Ext.create vs xtypes
What are the differences betwen using xtypes and the Ext.create() way?
I am asking, because, i was trying to build an app based on ST 2.1. In develop mode all worked fine. But after using sencha cmd to build (minfier) the app
i was facing the fact, that nearly no view was working. e.g. jsonp requests were successful, but the corresponding lists show nothingCode:sencha app build production
after some tests, i recognized the problem has something to do with using multiple view files. if i was putting the whole view stuff in one file, all worked fine in developmode and also after builds.
the comments in the docs gave me the needed hint. here (go down to comments) the user talwinder is posting a solution
I was using Ext.create() to instantiate a class/view. After using xtypes all works.
thanks to talwinder
-
21 Nov 2012 7:43 AM #2
I have the same problem. but i can't render it in one view because i render each view to another component in a page by the component id.
Does anybody from Sencha have a solution? or is it a bug?
-
21 Nov 2012 8:57 PM #3
dont you think it is a function calling?Code:Ext.create('class');
dont you think it is a simple object?Code:{ xtype:'xtype' }
if you get problem with Ext.create, make sure your require config is correct.Code:Ext.ClassManager.getName({xtype:'xtype'})// '' Ext.ClassManager.getName(Ext.create('class'))//classNameI write English by translator.
-
23 Nov 2012 1:17 AM #4
short example. two ways to add same view, all works, but after build the form added by function call is not working
requirements are full setCode:items: [ Ext.create('AppName.view.xyz'), // after build not doing fine { xtype: 'xyz' //ok } ]


Reply With Quote