最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - ExtJS name is undefined error - Stack Overflow

programmeradmin1浏览0评论

I have TypeError: name is undefined in an ExtJS Application. It happens on the following line:

win = Ext.create('Ext.window.Window',cfg);

Where cfg is a long list of properties. It only happens in certain situations, I was wondering if anyone has any ideas as to how I can track down the cause of the error in cfg? Perhaps using Firebug or some other debugging tool.

I have TypeError: name is undefined in an ExtJS Application. It happens on the following line:

win = Ext.create('Ext.window.Window',cfg);

Where cfg is a long list of properties. It only happens in certain situations, I was wondering if anyone has any ideas as to how I can track down the cause of the error in cfg? Perhaps using Firebug or some other debugging tool.

Share Improve this question asked Dec 20, 2012 at 14:50 Art FArt F 4,21210 gold badges52 silver badges84 bronze badges 5
  • 1 when the error occurs you should be able to view the call stack and see where is it failing both with firebug and chrome dev tools... – AMember Commented Dec 20, 2012 at 14:54
  • stack was the keyword that got me on the right track, If you put this as an answer I'll mark it 'correct'. – Art F Commented Dec 20, 2012 at 16:48
  • @ArtF You should post what the error was, too. – sra Commented Dec 20, 2012 at 16:50
  • @sra it was roughly what you described in your answer, one of my 'views' wasn't properly referenced in the controller, resulting the xtype not being in the ClassManager. I suspected that that is the issue when I posted the question but I wasn't sure, which is why I wanted to look at what was going on inside cfg more carefully. – Art F Commented Dec 20, 2012 at 17:01
  • You should ensure that any other user with a such a problem who stumbles over your question find a qualified answer. While looking at the stack points you in that direction still is not the solution. In such a case upvote and answer the question yourself. That help make stackoverflow better. – sra Commented Dec 20, 2012 at 17:29
Add a ment  | 

2 Answers 2

Reset to default 7

This is most likely the error you face if a xtype or classname that cannot be found from the ClassManager. So you should check if you have a typo within the cfg

when the error occurs you should be able to view the call stack and see where is it failing both with firebug and chrome dev tools...

发布评论

评论列表(0)

  1. 暂无评论