skwidgets
skwidgets

Reputation: 291

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 .

Upvotes: 3

Views: 5869

Answers (1)

hugomg
hugomg

Reputation: 69924

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

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

Upvotes: 1

Related Questions