Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sencha Touch Uncaught typeError: undefined is not a function

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 .

like image 210
skwidgets Avatar asked Jun 10 '26 23:06

skwidgets


1 Answers

Looks like Ext.Application has a capital A. Remember that Javascript is case sensitive.

http://docs.sencha.com/touch/1-1/#!/api/Ext.Application

like image 79
hugomg Avatar answered Jun 15 '26 06:06

hugomg