PDA

View Full Version : What is the correct way to include all required dependencies in app-all.js



dexster
20 Nov 2011, 11:42 PM
I've built the sample MVC app at http://www.sencha.com/learn/the-mvc-application-architecture/ and used the SDK tools to create the minified prod. version.

When opening the app. it works fine, shows the grid and has all the required dependencies in app-all but double clicking on a grid row to open a popup window causes about 21 request to the extjs/src folder to load the required dependencies eg Load.js, TextArea.js etc...

What do I add where to get these included in the app-all file?

mitchellsimoens
21 Nov 2011, 9:13 AM
In each class you can specify the requires/uses config that is an array of Classes it requires/uses. This will setup the jsb3 file to include the classes used in the build and in the correct order.

The difference between requires and uses is when the classes get included. If you put classes in requires, you are telling the SDK tools that those classes need to be defined before the class you are defining is defined. If you use uses, it is telling the SDK tools that those classes need to be defined but can be after the class you are defining is defined.