gpt4 book ai didi

sencha-touch - 无法获取商店(无法创建无法识别的别名的实例)

转载 作者:行者123 更新时间:2023-12-04 05:07:42 24 4
gpt4 key购买 nike

我是 Sencha Touch 2 的新手,并尝试按照此 tutorial 来学习它.打开 index.html 时出现错误。这是错误:

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

谢谢!

编辑:

根据 hekomobile 的建议,我做了一些更改。 requires 属性现在是:

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

此外,将 itemTpl 属性字符串全部放在一行中似乎可以解决问题(有点)。

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

[WARN][NotesApp.view.NotesList#applyStore] 找不到指定的 Store Console.js:35

可以下载该项目代码的当前状态here .

最佳答案

requires: ['NotesApp.your_folder.your_class'] 放入 app.js 存档中

Ext.application({
name: 'NotesApp',

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

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

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

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

关于sencha-touch - 无法获取商店(无法创建无法识别的别名的实例),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11368708/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com