1. #11
    Sencha User
    Join Date
    May 2012
    Posts
    63
    Vote Rating
    6
    jeffrey.hobson is on a distinguished road

      0  

    Default


    I'm glad you posted that; it worked fine until I tried to deploy using "sencha app build testing", then I had to switch to your method.

  2. #12
    Sencha User
    Join Date
    Jul 2012
    Posts
    56
    Answers
    1
    Vote Rating
    1
    markgogreen is on a distinguished road

      0  

    Default


    Loading the global variables this way, seems to load them after everything else has been written, causing undefined errors. Has anyone else noticed this?? If so, do you have a fix?

  3. #13
    Sencha User
    Join Date
    Feb 2013
    Location
    Mumbai, INDIA
    Posts
    6
    Vote Rating
    0
    alok0412 is on a distinguished road

      0  

    Default


    Quick question Mitchell, in my project I have more than 50 app level static variables and similar 4-5 static functions for which I have created separate util classes and placed them like app/util/URL_Util.js and so on which allows me to keep them grouped approapriately.

    So, my question is what would you suggest if I have to keep these static utils in separate files for a clean looking app?

    Thanks!
    Alok

  4. #14
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,399
    Answers
    3549
    Vote Rating
    849
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Quote Originally Posted by alok0412 View Post
    So, my question is what would you suggest if I have to keep these static utils in separate files for a clean looking app?
    You can have as many utility classes as you need, there isn't any limitation but give them meaningful names.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  5. #15
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,399
    Answers
    3549
    Vote Rating
    849
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Quote Originally Posted by markgogreen View Post
    Loading the global variables this way, seems to load them after everything else has been written, causing undefined errors. Has anyone else noticed this?? If so, do you have a fix?
    Did you require it in app.js before the Ext.application call using Ext.require?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.