0

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
Community
  • 1
  • 1
Olivier Pons
  • 15,363
  • 26
  • 117
  • 213
  • Its suggesting that you tell ExtJs that these custom files will be used by your application so that it can manage the loading of them as needed. It wont do any harm to add above the Ext.onReady – Scriptable Jan 27 '15 at 14:17
  • Ok, but like I said I've generated this application using the Sencha generator command line. This implies that if you search for "`Ext.onReady`" in the loaded files (watch the network here: http://www.wogwog.fr/gestion/gestion/index.html) there are only pre-compiled files that have "`Ext.onReady`", other ones are just declaration of classes, that I suppose, are initialized **after** all the basic stuff, so, I guess, **after** Ext.onReady. Thus you may be right, but I just need the exact place in the basic application generated by SenchaCmd to put this. I'm sure this could be a few lines. – Olivier Pons Jan 28 '15 at 09:50

2 Answers2

2

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

Olivier Pons
  • 15,363
  • 26
  • 117
  • 213
0

try adding TreeGroupes to the views config of MainController.js

egerardus
  • 11,316
  • 12
  • 80
  • 123
  • Hi, I've tried to add this: `views: ['TreeGroupes'],` in the `view/main/MainController.js` and same story. So I've tried ``views: ['dsfqsdList', 'dqdqsdDetail'],`` and no errors - like it's never used. 3 days waiting & searching. Three years after my question here http://stackoverflow.com/a/6944722/106140 where I was in a hurry and really not happy to loose my time, it seems nothing has changed with Sencha / ExtJS. What a pity. – Olivier Pons Jan 28 '15 at 07:53