当前位置:编程问答 > JS >

Extjs4---Uncaught TypeError: Cannot call method 'apply' of undefined

我遇到的这个错误原因是没有继承相应的类导致的,代码如下:
[javascript] 
Ext.define( 
        'SMS.view.TabPanel', 
        { 
            //extend:'Ext.tab.Panel',//因为没有继承类导致的 
            initComponent:function(){ 
                Ext.apply( 
                        this, 
                        { 
                            id:'content-panel', 
                            region:'center', 
                            defaults:{ 
                                autoScoll:true, 
                                bodyPadding:10 
                            }, 
                            activeTab:0, 
                            border:false, 
                            items:[ 
                                   { 
                                       id:'HomePage', 
                                       title:'首页', 
                                       layout:'fit' 
                                   } 
                            ] 
                        } 
                ); 
                this.callParent(arguments);  
            } 
        } 
); 

在谷歌浏览器中的错误如下:

我们可以看到在调用callParent方法时因为没有引入类导致的

补充:web前端 , JavaScript ,
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,