View Full Version : Where does require look for files?
9 Nov 2012, 4:38 AM
I wonder where the Ext.require function looks up the JS files to load?
Is searched the documentation, docs and forum but did not find any answer.
Can anyone help me out? Do I need to stick to the proposed app structure?
9 Nov 2012, 4:56 AM
Ext.Loader will look for class files basing on the path of namespace that is set by using Ext.Loader.setPath(). You can also set path for namespaces by using Ext.Loader.setConfig().
9 Nov 2012, 8:09 AM
Does this require to have the standard app folder structure and only work for applications written in MVC architecture?
So, as an example, is it possible to define some folders where to look up scripts? Something like:
9 Nov 2012, 3:41 PM
It is applied for all kind of applications basing on Ext framework.
9 Nov 2012, 7:35 PM
Your java-script files and directory structure must follow the Sencha naming convention.
i.e. the class name matches the directory structure
App path as defined with loader -> Desktop folder -> view folder -> Javscript file named MainWindow.js
12 Nov 2012, 2:11 AM
Thanks! That is exactly the example that I needed to understand :)
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.