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

      0  

    Default Global Variables / Environment Variables

    Global Variables / Environment Variables


    I am looking for some type of environment variables, but not sencha's definition of them. Typically environment would be development, staging, production...

    I have tried a few different ways to setup global variables so I can change my dev links to production links without going threw all the code. Everything works fine until I try to deploy the app, then I get undefined errors for all those variables.

    Does anyone know the best way to do this?

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,916
    Vote Rating
    443
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    See if this information helps:
    http://www.sencha.com/forum/showthread.php?231354

    Scott.

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

      0  

    Default


    It may, but I cannot access that post.

  4. #4
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,916
    Vote Rating
    443
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Copy info:


    You could create an external Utils.js in your app dir that contains your unique set of functions.

    Utils.js

    Code:
    Ext.define('MY.Utils', {
        singleton : true,
    ..
    });
    In your app.js
    Code:
    Ext.application({
        name               : 'MY',
        autoCreateViewport : true,
    
        requires: [
            'MY.Utils'
        ],
    
        controllers : [
            'main'
        ]
    });
    In your controller:

    Code:
    var myvalue = MY.Utils.someFunction();
    Scott.

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

      0  

    Default


    Thank you soooo much! That did the trick!

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi