Sencha touch 无法获取存储(无法创建无法识别别名的实例)

Sencha touch 无法获取存储(无法创建无法识别别名的实例),sencha-touch,sencha-touch-2,Sencha Touch,Sencha Touch 2,我对Sencha Touch 2还不熟悉,并试图通过以下方式学习它。打开index.html时出错。以下是错误: [Ext.createByAlias] Cannot create an instance of unrecognized alias: widget.noteslist sencha-touch-debug.js:6295 Uncaught Error: 谢谢 编辑: 按照赫克莫比尔的建议,我做了一些改变。所需的属性现在是: requires: [ 'Notes

我对Sencha Touch 2还不熟悉,并试图通过以下方式学习它。打开
index.html
时出错。以下是错误:

[Ext.createByAlias] Cannot create an instance of unrecognized alias: widget.noteslist
sencha-touch-debug.js:6295 Uncaught Error: 
谢谢

编辑:

按照赫克莫比尔的建议,我做了一些改变。所需的属性现在是:

requires: [
        'NotesApp.view.NotesListContainer',
        'NotesApp.view.NotesList'
],
此外,将itemTpl属性字符串全部放在一行似乎可以解决问题(sorta)

部分应用程序加载(顶部工具栏加载),但商店没有加载,我收到以下错误:

[WARN][NotesApp.view.NotesList#applyStore]在Console中找不到指定的存储。js:35


可以下载此项目代码的当前状态。

到app.js存档中放入
需要:['NotesApp.your\u folder.your\u class']
类似的内容

Ext.application({
name: 'NotesApp',

    requires: ['NotesApp.view.NotesListContainer'],

    views: ['NotesListContainer'],
    controllers: ['Notes'],
    models: ['Note'],

    launch: function() {
        Ext.Viewport.add({
           xtype: 'noteslistcontainer'
        })
    }
});

等等。我希望这有帮助。:)

嘿@Nathan把正确的项目放在TPL上,就像这样

itemTpl: '<pre><div class="list-item-title">{title}</div><div class="list-item-narrative">{narrative}</div></pre>'
itemTpl:'{title}{rantative}'
在.js文件中,这是错误的。:)


添加
需要:['NotesApp.view.NotesListContainer',
到我的
app.js
文件无法修复它。我仍然收到相同的错误。什么??,删除别名:'widget.noteslistcainer',并输入:'noteslistcainer',。你想展示什么?我想你的意思是
xtype:'noteslistcontainer'
,但这仍然会给我同样的错误。应用程序应该看起来像,但看起来像。使用
type:
而不是
xtype:
会给出我发布的第一个错误。你是说
type
还是
xtype
?没问题:)我发现了另一个错误,解决了我的问题。教程的作者忘记在
app.js
中添加行
stores:['Notes']
。我一加上这句话,它就可以正常工作了。是的,我忘了提到我做过这件事。