[英]Sencha Touch Uncaught typeError: undefined is not a function
I have recently began to check out Sencha Touch. 我最近开始检查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. 从sencha提供的app.js中的一些基本代码运行良好。 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 有了这个,我得到一个:未捕获的typeError:undefined不是一个函数
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. 第二种方式是我在查找sencha时看到的所有地方,但它似乎在帮我解决问题。 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. 看起来Ext.Application有一个大写字母A.请记住,Javascript区分大小写。
http://docs.sencha.com/touch/1-1/#!/api/Ext.Application http://docs.sencha.com/touch/1-1/#!/api/Ext.Application
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.