2
我正在使用ExtJS 4.0的新MVC体系结构构建应用程序。我正在寻找一种方法来遍历应用程序中的所有控制器。下面我已经提供了一些示例代码来说明我正在尝试做什么。有没有办法让ExtJS 4.0应用程序中的所有控制器
Ext.application({
name: 'MyApp',
appFolder: '/App',
controllers: [
'HdMenuItemsController'
],
launch: function() {
//This works:
this.getController('HdMenuItemsController')
//I want to do something like this:
this.controllers.each(myFunction);
//or this:
this.getAllControllers().each(myFunction);
//or this:
Ext.getControllersForApp(this).each(myFunction);
}
});