ExtJS 4.1.1a: Why no getApplication() method for my app?

☆樱花仙子☆ 提交于 2019-12-11 09:18:33

问题


I started with https://github.com/mclin/extjs-mvc-example, and set out to modify it so that it used Ext.application, instead of just using Ext.Create() for a subclass of Ext.app.Application.

So far so good, until I try to use the getApplication() function, which isn't there.

The code of the app definition looks like ...

Ext.application({
   name: 'Books',
   extend: 'some.class.name',
   controllers: ['Books'],
   ...
});

The result of this is a global object named 'Books', alright, but it does not define getApplication(), contrary to the Ext documentation.


回答1:


From memory getApplication was added after 4.1.1, 4.12 or 4.13 IIRC.

Also, you shouldn't use extend with Ext.application().



来源:https://stackoverflow.com/questions/13260646/extjs-4-1-1a-why-no-getapplication-method-for-my-app

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!