Synchronously loading consider adding Ext.require(…) above Ext.onReady

天涯浪子 提交于 2019-12-13 06:56:32

问题


I've already read this, this, this and this but it didn't give a solution.

I've generated a basic application with sencha cmd.

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.

Here's the tree:

.
├── Application.js
├── model
│ ├── Groupe.js
│ └── Readme.md
├── Readme.md
├── store
│ ├── Readme.md
│ └── TreeGroupes.js
└── view
├── main
│ ├── MainController.js
│ ├── Main.js
│ └── MainModel.js
└── TreeGroupes.js

So here's my logic:

  • view/main/Main.js just needs Gestion.view.TreeGroupes so I only add "Gestion.view.TreeGroupes" in the "requires" configuration of this file;
  • view/TreeGroupes.js needs Gestion.store.TreeGroupes so I only add "Gestion.store.TreeGroupes" in the "requires" configuration of this file;
  • store/TreeGroupes.js needs Gestion.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

回答1:


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...

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...




回答2:


try adding TreeGroupes to the views config of MainController.js



来源:https://stackoverflow.com/questions/28155929/synchronously-loading-consider-adding-ext-require-above-ext-onready

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!