Sencha Touch未捕获typeError:undefined不是一个函数 [英] Sencha Touch Uncaught typeError: undefined is not a function
问题描述
从sencha提供的一些app.js中的基本代码运行正常。其他人似乎会得到错误。例如:
new Ext.application({
name:NotesApp,
launch:function (){
console.log(App Launch);
}
});
这样我得到一个:未捕获typeError:undefined不是一个函数
如果我在开始时重写没有新的代码,如下所示:
Ext.application({
名称:NotesApp,
启动:function(){
console.log(App Launch);
}
});
我得到未捕获类型错误:对象#没有方法'应用程序'
第二种方式是在查看sencha时看到的地方,但似乎正在给我发问题。任何人都可以帮助我了解我在做错什么。
谢谢。
看起来Ext.Application有一个大写A.记住Javascript是区分大小写的。
http://docs.sencha.com/touch/1-1/#!/api/Ext.Application
I have recently began to check out Sencha Touch. In following there tutorials I have ran into some issues that I cannot seem to resolve.
Some of the basic code in app.js that is provided from sencha runs fine. Others seem to get errors. For Example:
new Ext.application({
name: "NotesApp",
launch: function() {
console.log("App Launch");
}
});
With this I get an: Uncaught typeError: undefined is not a function
If I rewrite the code without new at the beginning like:
Ext.application({
name: "NotesApp",
launch: function() {
console.log("App Launch");
}
});
I get "Uncaught typeError: Object # has no method 'application'"
The second way is what I see all over the place when looking up sencha but it seems to be gining me issues. Can any one help me understand what I am doing wrong.
Thank you .
Looks like Ext.Application has a capital A. Remember that Javascript is case sensitive.
http://docs.sencha.com/touch/1-1/#!/api/Ext.Application
这篇关于Sencha Touch未捕获typeError:undefined不是一个函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!