日期:2014-05-16  浏览次数:20356 次

关于extjs里面的 RowEditor 的简单问题
就是使用 
var editor = new Ext.ux.grid.RowEditor();
但是每次执行到这里 firebug 就报错说 “ Ext.ux.grid is undefined ”
是什么文件没有引用么?
这个问题纠结好久了。。。
  
我引用了 ExtJS/examples/ux/RowEditor.js 啊,怎么还会有这种问题??

求各位大大解答。。。

------解决方案--------------------
引用的相对路径没问题吧。
------解决方案--------------------
引用 错了,那个是调用 的文件,源码位置 在/examples/grid/row-editor.js
------解决方案--------------------
你自己看/examples/ux/RowEditor.js中
第一句话就是
Ext.ns('Ext.ux.grid');

既然是“ Ext.ux.grid is undefined ”

明显说明你根本没有加载到这个文件.

注意顺序
------解决方案--------------------
顺便说下

Ext.ns('Ext.ux.grid');

这个你懂的吧?

需要解释否?

------解决方案--------------------
探讨

引用:

顺便说下

Ext.ns('Ext.ux.grid');

这个你懂的吧?

需要解释否?


另外,我加上了这句话 Ext.ns('Ext.ux.grid');
就又有另外一个错误了:“Ext.ux.grid.RowEditor is not a constructor”。。