PDA

View Full Version : Use of Ext.require and Ext.syncRequire with native app (phonegap)



mcelotti
12 Nov 2014, 10:23 AM
Ext.require and Ext.syncRequire do not work on native app packaging (with phonegap).
My code is something like:


Ext.syncRequire("MyApp.view.*", function() {
// do other stuff
});

On desktop browser it works, on real device the app hangs at startup (<blink>3 white dots</blink>).
If I switch to the classic 'require : ["MyApp.view.*"]' it works on both contexts.
I would like to use Ext.require because I'd like to load classes after some other stuff (ie translations, localstorage data) has been loaded.

Thanks,
Marco

mcelotti
13 Nov 2014, 7:33 AM
Ok, found this:
"The wildcard '*' will only work for Ext widgets as we have a manifest file to tell the class system what classes are in certain namespaces"

http://www.sencha.com/forum/showthread.php?178452-Ext.require-with-expression-doesn-t-work-for-me&highlight=manifest
(http://www.sencha.com/forum/showthread.php?178452-Ext.require-with-expression-doesn-t-work-for-me&highlight=manifest)