[英]Ext.application: Uncaught TypeError: undefined is not a function
[英]Uncaught TypeError: undefined is not a function / Ext.Require / ExtJS
我在Symfony應用程序中使用ExtJS和GeoExt。 在由於Symfony的資產傾銷而因錯誤的布線而導致一些麻煩之后,此刻一切正常。
在嘗試在Ext Panel內顯示OpenLayers的層時發現問題之后,我嘗試通過以下方式解決它:
Ext.require([
'GeoExt.panel.Map',
'GeoExt.tree.OverlayLayerContainer',
'GeoExt.tree.BaseLayerContainer',
'GeoExt.data.LayerTreeModel',
'GeoExt.tree.View',
'GeoExt.tree.Column',
]);
問題,我收到此錯誤:
Uncaught TypeError: undefined is not a function
錯誤來自Ext.Require
如果我把
Ext.require([
]);
里面什么也沒有,沒有錯誤。 一旦我將東西放進去,即使它是Ext.something,錯誤也會再次出現。
錯誤來自:
/server path/ExtJS4.2/src/menu/Manager.js:182
為什么呢
找到原因,我正在使用
ext-debug.js
切換到
ext-all.js
錯誤消失了。
我的功能仍然無法正常工作,但這不是我的問題的主題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.