In the demo it says we can set the 'paths' config value to contain {'Ext.ux.touch.grid': '<relative/path/to/Ext.ux.touch.grid>'} but doing so gives the following error:
Uncaught Error: [Ext.Loader] Failed loading 'http://localhost/app-path/www/sdk/src/ux/touch/grid/feature/Feature.js', please verify that the file exists
what's the best way to load a 3rd party script, something that i don't want to port to a sencha touch class? Ideally I could lazily load it rather than sticking it in index.html
what's the best way to load a 3rd party script, something that i don't want to port to a sencha touch class? Ideally I could lazily load it rather than sticking it in index.html
First you specify it in app.json as a resource to assure that the external script will get copied along with other scripts.
Second write code to lazy load the script, not using the Loader which requires you to have a class named as the script. You can use a Ajax request and an eval so you can be notified about the script loading phases.
I am curious, what do you mean on lazy loading the script files? I've included my 3rd party scripts in my app.json but I am getting an error saying that Uncaught ReferenceError: XY is not defined.
Lazy load just means that it doesn't get loaded right away, it gets loaded later. It's a general term with that meaning without specific implementation as it could be applied to any language. Lazy loading is an efficiency technique that lets you essentially spread out user wait time and bandwidth and/or only load what the user actually wishes to see. Simple example: Say you have 4 screens in your app but a user only navigates to two. Why load the other two up front?