Reputation: 5144
I'm new to Sencha Touch 2, and trying to learn it by following this tutorial. I'm getting an error when I open index.html
. Here's the error:
[Ext.createByAlias] Cannot create an instance of unrecognized alias: widget.noteslist
sencha-touch-debug.js:6295 Uncaught Error:
Thanks!
EDIT:
Following hekomobile's advice, I made a few changes. The requires property is now:
requires: [
'NotesApp.view.NotesListContainer',
'NotesApp.view.NotesList'
],
Also, putting the itemTpl property string all on one line seemed to fix the problem (sorta).
Part of the app loads (The top toolbar loads), but the store doesn't, and I'm getting this error:
[WARN][NotesApp.view.NotesList#applyStore] The specified Store cannot be found Console.js:35
The current state of the code for this project can be downloaded here.
Upvotes: 2
Views: 8438
Reputation: 1388
Hey @Nathan put correct itemTpl something like this,
itemTpl: '<pre><div class="list-item-title">{title}</div><div class="list-item-narrative">{narrative}</div></pre>'
in your .js file this wrong. :)
Upvotes: 1
Reputation: 1388
Into app.js archive put requires: ['NotesApp.your_folder.your_class']
something like this
Ext.application({
name: 'NotesApp',
requires: ['NotesApp.view.NotesListContainer'],
views: ['NotesListContainer'],
controllers: ['Notes'],
models: ['Note'],
launch: function() {
Ext.Viewport.add({
xtype: 'noteslistcontainer'
})
}
});
and so on. I hope this helps. :)
Upvotes: 6