I've upgraded my build tools for an ext + deftjs application from Sencha SDK to Sencha Cmd (v3). In doing so I also upgraded Ext to 4.2 and Deft to Ext 0.8. I initially had a problem with Ext.onReady() not being fired, resulting in my viewControllers not being instantiated from their corresponding views. However, I've fixed that and the application is now working in dev mode
I'm now trying to build the application using the commands sencha app refresh
and sencha app build
but the built application isn't loading at all.
Again, the my ViewControllers aren't being instantiated. The deft classes and the viewcontrollers have been added to all-classes.js by the build tools. (The Deft classes are first in the file + view controllers further down)
sencha.cfg contains the following classpath:
app.classpath=${app.dir}/Deft,${app.dir}/ux,${app.dir}/uvd,${app.dir}/app,${app.dir}/inj.js,${app.dir}/app.js
inj.js contains my loader declarations:
Ext.Loader.setConfig({
enabled:true,
paths:{
'UVd': 'uvd',
'Ext.ux' : 'ux',
'Deft' : 'Deft',
'FM' : 'app',
'Ext': 'ext/src'
}
});
Ext.syncRequire([
"Ext.Component",
"Ext.ComponentManager",
"Ext.ComponentQuery",
'Deft.mixin.Controllable',
'Deft.mixin.Injectable',
'Deft.Injector'
]);
My main Viewport is the first view to be instantiated, and contains the following declarations:
Ext.define('FM.view.Viewport', {
extend: 'Ext.panel.Panel',
requires: [
'FM.controller.Viewport'
],
// DI
controller: 'FM.controller.Viewport'
My dev index.html looks like this:
<!-- <x-compile> -->
<!-- <x-bootstrap> -->
<script src="ext/ext-all.js"></script>
<script src="bootstrap.js"></script>
<!-- </x-bootstrap> -->
<script type="text/javascript" src="inj.js"></script>
<script src="app.js"></script>
<!-- </x-compile> -->
Does anyone have any idea why the view controllers wouldn't be instantiated in a compiled version of the app?
Thanks