同步加载考虑添加Ext.require(...)以上Ext.onReady [英] Synchronously loading consider adding Ext.require(...) above Ext.onReady
问题描述
I've already read this, this, this and this but it didn't give a solution.
我已经生成了一个基本的应用程序使用sencha cmd。
I've generated a basic application with sencha cmd.
我已经创建了一个模型Groupe.js,一个TreeGroupes.js存储是Groupe行的集合。 js(抱歉,如果我没有使用正确的词,我希望你知道我的意思)。
然后我创建了一个这个集合的视图:Gestion.view.TreeGroupes。我在主控制器视图/ main / Main.js中显示。
I've created a model "Groupe.js", a store "TreeGroupes.js" that is a "collection" of rows of "Groupe.js" (sorry if I'm not using the right words, I hope you know what I mean). Then I've created a view of this collection: Gestion.view.TreeGroupes. And I'm displaying it in my main controller view/main/Main.js.
这是树:
.
├── Application.js
├── model
│ ├── Groupe.js
│ └── Readme.md
├── Readme.md
├── store
│ ├── Readme.md
│ └── TreeGroupes.js
└── view
├── main
│ ├── MainController.js
│ ├── Main.js
│ └── MainModel.js
└── TreeGroupes.js
所以这是我的逻辑:
-
view / main / Main.js
只需要Gestion.view.TreeGroupes
,所以我只添加Gestion.view。
配置此文件;中的TreeGroupes
需要 -
/TreeGroupes.js
需要Gestion.store.TreeGroupes
所以我只添加Gestion.store.TreeGroupes
配置此文件; -
store / TreeGroupes.js
需要Gestion.model.Groupe
获取数据,所以我只添加Gestion.mod
配置文件中的中的el.Groupe
view/main/Main.js
just needsGestion.view.TreeGroupes
so I only add "Gestion.view.TreeGroupes
" in the "requires
" configuration of this file;view/TreeGroupes.js
needsGestion.store.TreeGroupes
so I only add "Gestion.store.TreeGroupes
" in the "requires
" configuration of this file;store/TreeGroupes.js
needsGestion.model.Groupe
to get data so I only add "Gestion.model.Groupe
" in the "requires
" configuration of this file.
它一直在说这两个警告:
It keeps saying me those two warnings:
[W] [Ext.Loader] Synchronously loading 'Gestion.view.TreeGroupes'; consider adding Ext.require('Gestion.view.TreeGroupes') above Ext.onReady
[W] [Ext.Loader] Synchronously loading 'Gestion.store.TreeGroupes'; consider adding Ext.require('Gestion.store.TreeGroupes') above Ext.onReady
推荐答案
没有找到解决方案,所以我不得不阅读文档,尝试 sencha app watch
No solution found worked, so I had to read the documentation and try sencha app watch
root@mycomputer:/web/htdocs/bigpath/myapp# sencha app watch
Sencha Cmd v5.1.0.26
[INF] Processing Build Descriptor : default
[INF] Loading app json manifest...
[INF] Appending content to /web/htdocs/bigpath/myapp/bootstrap.js
[INF] Writing content to /web/htdocs/bigpath/myapp/bootstrap.json
[INF] merging 219 input resources into /web/htdocs/bigpath/myapp/build/development/Gestion/resources
[INF] merged 0 resources into /web/htdocs/bigpath/myapp/build/development/Gestion/resources
[INF] merging 0 input resources into /web/htdocs/bigpath/myapp/build/development/Gestion
[INF] merged 0 resources into /web/htdocs/bigpath/myapp/build/development/Gestion
[INF] writing sass content to /web/htdocs/bigpath/myapp/build/temp/development/Gestion/sass/Gestion-all.scss.tmp
[INF] appending sass content to /web/htdocs/bigpath/myapp/build/temp/development/Gestion/sass/Gestion-all.scss.tmp
[INF] appending sass content to /web/htdocs/bigpath/myapp/build/temp/development/Gestion/sass/Gestion-all.scss.tmp
[INF] executing compass using system installed ruby runtime
unchanged Gestion-all.scss
[INF] Mapping http://localhost:1841/ to /web/htdocs/bigpath/myapp...
[INF] ------------------------------------------------------------------
[INF] Starting web server at : http://localhost:1841
[INF] ------------------------------------------------------------------
[INF] Waiting for changes...
所以你可以看到它修改了一些东西,现在我没有问题了。现在我有另一个问题,我肯定会花3天,像这样一个...
So as you can see it modified some stuff and now I don't have the problem anymore. Now I have another problem that I'm sure will take 3 days, like this one...
这篇关于同步加载考虑添加Ext.require(...)以上Ext.onReady的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!