从ExtJs3升级到ExtJs4时出错 - “成员被udefined”在兼容模式? [英] Error upgrading from ExtJs3 to ExtJs4-''members is udefined" in compat mode?

查看:165
本文介绍了从ExtJs3升级到ExtJs4时出错 - “成员被udefined”在兼容模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将我的项目从Ext3.3更新为Ext4。

我已经添加了 ext3-core-compat.js 和<$添加新的ext4 ext-all-debug.js 文件后,c $ c> ext3-compat.js 文件。



我在ext-all-debug.js的第3262行得到一个成员是udefined错误。 >
Ext.extend方法中哪个接受3个参数:

  Ext.extend = function(subclass,超类,成员)

我可以从ExtJs4文档中看到Ext.extend已被弃用,但是我只是想要将我的所有 Ext.extend 更改为 Ext.define



任何帮助的人?

解决方案

我假设你使用匿名构造函数语法,像这样?

  MyClass = function(config){
...
}
Ext.extend(MyClass,SomeOtherClass,{
...
});

如果是这样,这个表单不能被Ext4或compat层检测到,必须手动更新新标准 Ext.define 语法。我不知道迁移文档中是否提到这个,如果不是,我将添加它。


I'm updating my project from Ext3.3 to Ext4.
I have added the ext3-core-compat.js and ext3-compat.js files after added the new ext4 ext-all-debug.js file.

I am getting a members is udefined error on line 3262 of ext-all-debug.js.
Which is inside the Ext.extend method which accepts 3 parameters:

Ext.extend = function(subclass, superclass, members) 

i can see from the ExtJs4 documentation that Ext.extend is deprecated, however I just want to get my code working before I change all of my Ext.extend to Ext.define.

Any help guys?

解决方案

I assume that you're using the anonymous constructor syntax, like this?

MyClass = function(config) {
    ...
}
Ext.extend(MyClass, SomeOtherClass, {
    ...
});

If so, this form cannot be detected by Ext4 or the compat layer and must be updated manually to the new standard Ext.define syntax. I'm not sure if this is currently mentioned in the migration documentation, and if not I'll add it.

这篇关于从ExtJs3升级到ExtJs4时出错 - “成员被udefined”在兼容模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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