2

I am new to ExtJS (4.1) and now I am trying to make an MVC application work, but there seems to be a bug somewhere. Here is my app.js:

Ext.Loader.setConfig({enabled:true});

console.log("out");

Ext.application({
name: 'FI',

controllers:['ListController'],
launch: function() {
    console.log("launch");
   }
});

and this is the ListController:

Ext.define('Fi.controller.ListController', {
extend: 'Ext.app.Controller',
id: 'installBaseListController',
init: function() {


    console.log("init");
   }
});

All the needed js files are loaded properly and no errors are displayed in the console.

However, the only message displayed is "out", meaning that the controller does not get instantiated and the applicationa itself doesn't start. Why?

4

2 回答 2

2

应用程序被命名为'FI'(大写I),但控制器打开Fi(小写i)!

于 2012-06-13T10:51:27.853 回答
1

备查:

当您获得任何相关文件/类时也会发生这种情况 Ext.define('Xxx.xxx.Xxxx') 拼写错误(区分大小写)

或者,任何 launch/init/initComponent 函数拼写错误(区分大小写)。

于 2013-05-01T06:16:34.400 回答