简体   繁体   English

Extjs:未捕获的TypeError:对象# <Object> 没有方法“读取”

[英]Extjs: Uncaught TypeError: Object #<Object> has no method 'read'

I wanted to post the answer I found to the error I was getting 我想发布我发现的错误答案

Uncaught TypeError: Object #<Object> has no method 'read'

Hopefully it will save some people a few hours of headache. 希望它可以节省一些人几个小时的头痛。

I traced the code and got to a point where Ext was trying to call the proxies reader.read method. 我跟踪了代码,直到Ext试图调用代理reader.read方法。 But for whatever reason the reader was not being created. 但是无论出于什么原因,都没有创建读者。 I searched around online and found that there's some bug in Ext. 我在网上搜索后发现,Ext中存在一些错误。 At least that seemed to be the consensus. 至少这似乎是共识。

What seemed to solve other's problem and my problem was to either include the models using script tags before creating the stores. 似乎可以解决其他人的问题,而我的问题是要么在创建商店之前就使用脚本标签包含模型。 Or using Ext.require( your models ) before creating the stores. 或在创建商店之前使用Ext.require( 您的模型 )。

Hope this helps! 希望这可以帮助!

===Update=== line 40866 in ext-all-debug.js ===更新=== ext-all-debug.js中的第40866行

        if (me.lastFieldGeneration !== **me.model**.prototype.fields.generation) {
            me.buildExtractors(true);
        }

This is the line that blows up if a model isn't set or undefined. 如果未设置或未定义模型,这条线会炸毁。 Not sure if it has anything to do with the above error, but this is where ext crashed for me with no errors when my model wasn't loading correctly. 不知道它是否与上述错误有关,但是当我的模型加载不正确时,这就是ext崩溃的原因。 This is seems like poor coding to me, referencing something without checking if it's defined or not. 对我来说,这似乎是很差的编码,它引用某些内容而不检查其定义是否正确。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 未捕获的TypeError:对象# <Object> 没有方法&#39;getValue&#39; - Uncaught TypeError: Object #<Object> has no method 'getValue' 未捕获的TypeError:对象# <YYY> 没有方法“ xxx” - Uncaught TypeError: Object #<YYY> has no method 'xxx' 未捕获的TypeError:对象[object Object]没有方法&#39;onAdded&#39; - Uncaught TypeError: Object [object Object] has no method 'onAdded' 未捕获的TypeError:Symfony 2中的ExtJS对象原型只能是Object或为null - Uncaught TypeError: Object prototype may only be an Object or null with ExtJS in Symfony 2 Sencha:未捕获的TypeError:对象函数(){h.apply(this,arguments)}没有方法&#39;setActiveItem&#39; - Sencha : Uncaught TypeError: Object function (){h.apply(this,arguments)} has no method 'setActiveItem' 未捕获的TypeError:对象函数() - Uncaught TypeError: Object function () Extjs Sencha编译的应用程序引发Uncaught TypeError:对象原型只能是Object或null - Extjs sencha compiled app throws Uncaught TypeError: Object prototype may only be an Object or null 如何在Extjs 4中读取对象 - How to read object in Extjs 4 Extjs 4未捕获的TypeError - Extjs 4 Uncaught TypeError ExtJS:未捕获的TypeError:无法读取未定义的属性“作用域” - ExtJS: Uncaught TypeError: Cannot read property 'scope' of undefined
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM