1. #1
    Sencha User
    Join Date
    Apr 2010
    Posts
    25
    Vote Rating
    0
    Oliver Specht is on a distinguished road

      0  

    Default Answered: Where does require look for files?

    Answered: Where does require look for files?


    Hi,
    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?

    Thanks!

    Oliver

  2. Your java-script files and directory structure must follow the Sencha naming convention.
    i.e. the class name matches the directory structure

    e.g. MyApp.desktop.view.MainWindow

    App path as defined with loader -> Desktop folder -> view folder -> Javscript file named MainWindow.js

  3. #2
    Sencha - Community Support Team
    Join Date
    Jan 2012
    Posts
    1,376
    Answers
    346
    Vote Rating
    109
    vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all

      0  

    Default


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

  4. #3
    Sencha User
    Join Date
    Apr 2010
    Posts
    25
    Vote Rating
    0
    Oliver Specht is on a distinguished road

      0  

    Default


    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:

    - app
    - data
    - ext
    - myscripts

    Thanks,
    Oliver

  5. #4
    Sencha - Community Support Team
    Join Date
    Jan 2012
    Posts
    1,376
    Answers
    346
    Vote Rating
    109
    vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all

      0  

    Default


    It is applied for all kind of applications basing on Ext framework.

  6. #5
    Touch Premium Member suzuki1100nz's Avatar
    Join Date
    Apr 2011
    Location
    New Zealand
    Posts
    434
    Answers
    21
    Vote Rating
    37
    suzuki1100nz has a spectacular aura about suzuki1100nz has a spectacular aura about suzuki1100nz has a spectacular aura about

      0  

    Default


    Your java-script files and directory structure must follow the Sencha naming convention.
    i.e. the class name matches the directory structure

    e.g. MyApp.desktop.view.MainWindow

    App path as defined with loader -> Desktop folder -> view folder -> Javscript file named MainWindow.js

  7. #6
    Sencha User
    Join Date
    Apr 2010
    Posts
    25
    Vote Rating
    0
    Oliver Specht is on a distinguished road

      0  

    Default


    @suzuki:

    Thanks! That is exactly the example that I needed to understand

Thread Participants: 2

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar