PDA

View Full Version : Bug in sencha compile for Ext application controllers



fdp
28 Nov 2012, 6:58 AM
I found a bug with Sencha Cmd v3.0.0.250

with this app.js


Ext.application({
name: 'MyApp',
controllers: [
'Login'
],
views: [
'MyApp.view.Viewport'
],
launch: function() {
// ...
}
});


The file app/controller/Login.js is not added to all-classes.js

with this fix:

with this app.js


Ext.application({
name: 'MyApp',
requires: [
'MyApp.controller.Login'
],
controllers: [
'Login'
],
views: [
'MyApp.view.Viewport'
],
launch: function() {
// ...
}
});


The file is added to all-classes.js

My cmd is:

sencha compile page --strip-comments --input-file login.html --output-page build/login.html

Stormseeker
6 Dec 2012, 11:57 AM
This is happening to me too. It seems like Sencha Cmd is ignoring the controllers property in the Ext.application and the only way I can get it to work is to list all the controllers as required.:-?

I am using the regular 'sencha ant testing build' or 'sencha app build' and the results are the same. All the files seem to be created correctly but when I load it up, it looks for the controller as they weren't included in the all-classes.js.

kishore_r
12 Dec 2012, 12:04 PM
I am facing the exact same issue. I did get the all-classes.js to include the controllers by doing a

Ext.require('MyApp.controller.*');

in my app.js. But I still get a bunch of 404's for the Controller and View classes even though the all-classes.js has them included.

Any ideas on how to get past this issue?

Thanks in advance

mberrie
13 Dec 2012, 8:15 PM
AFAIK Sencha Cmd has support for detecting implicit dependencies such as these controller classes. Maybe a bug?

If you need to hint a dependency to the compiler, you can also use

//@require app.controller.MyController

FoxMulder900
30 Apr 2013, 7:24 AM
Any updates on this?

Related thread:
http://www.sencha.com/forum/showthread.php?248148-sencha-cmd-v3.-compile-mvc-structure/page2
(http://www.sencha.com/forum/showthread.php?248148-sencha-cmd-v3.-compile-mvc-structure/page2)