ExtJS 4.1.1a:为什么我的应用程序没有getApplication()方法? [英] ExtJS 4.1.1a: Why no getApplication() method for my app?

查看:107
本文介绍了ExtJS 4.1.1a:为什么我的应用程序没有getApplication()方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从 https://github.com/mclin/extjs-mvc-example,并开始修改它,以便它使用Ext.application,而不是使用Ext.Create()作为Ext.app.Application的子类。



到目前为止这么好,直到我尝试使用不存在的getApplication()函数。



应用程序定义的代码看起来像...

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

这个结果是一个名为Books的全局对象,没关系,但是没有定义getApplication (),与Ext文档相反。

解决方案

从内存getApplication在4.1.1,4.12或4.13 IIRC之后添加。 / p>

此外,您不应该使用Ext.application()扩展。


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.

解决方案

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

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

这篇关于ExtJS 4.1.1a:为什么我的应用程序没有getApplication()方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆