I use extjs in my CMP. And sometimes I have js errors. Extjs is a huge monster and sometimes it says about errors. For example I add custom xtype to a field (or another thing) and have an error Uncaught TypeError: Cannot read property 'dom' of undefined
Ext.ux.form.SuperBoxSelect.Ext.extend.manageNameAttribute index.php?f=/manager/assets/modext/core/modx.localization.js,/manager/assets/modext/util/utilities.…:26
h.Event.fire ext-all.js:21
h.Observable.fireEvent ext-all.js:21
Ext.extend.clear ext-all.js:21
Ext.ux.form.SuperBoxSelect.Ext.extend.killItems index.php?f=/manager/assets/modext/core/modx.localization.js,/manager/assets/modext/util/utilities.…:26
Ext.ux.form.SuperBoxSelect.Ext.extend.reset index.php?f=/manager/assets/modext/core/modx.localization.js,/manager/assets/modext/util/utilities.…:26
(anonymous function) ext-all.js:21
Ext.extend.each ext-all.js:21
Ext.form.BasicForm.Ext.extend.reset ext-all.js:21
MODx.Ajax.request.listeners.success.fn index.php?f=/assets/components/minishop2/js/mgr/minishop2.js,/manager/assets/modext/util/datetime.j…:127
h.Event.fire ext-all.js:21
h.Observable.fireEvent ext-all.js:21
Ext.apply.success modx.js:423
Ext.extend.handleResponse ext-all.js:21
f ext-base.js:21
m ext-base.js:21
(anonymous function)
I have no the remotest idea how I can find what the problem really is? What're my actions must be?
ps don't know how to highlight code)
[ed. note: pinkrabbit last edited this post 12 years, 9 months ago.]
-
☆ A M B ☆
- 2,475 Posts
ExtJS is really tough to debug. Firebug helps a bit, but it's tough -- sometimes the core ExtJS code has warnings which can be ignored (but how to know which is a real problem and which can be ignored?). You can't even place console.log statements in much of the JS code because so much of it revolves around gargantuan ridiculously huge configuration arrays.
I know this is probably not helpful, but I burned out on ExtJS and I avoid using it in my CMP's because of this. I only use ExtJS where I have to (e.g. in CRC's). All of its advantages look great on paper: it's an extremely powerful framework. But the realities of developing with it make it a real problem. The ExtJS documentation is awful: they have consistently mistaken definitions for real examples, so at the end of the day it doesn't matter how super-awesome and powerful their framework supposedly is because only a few brilliant developers have the patience to figure out how to use it.
To highlight the code (which might get you more answers), just select it and click on the <> icon in the toolbar.