Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

#define Equivalent

I would like to have some constants in the app such as:

API_SERVER = 'http://devserver.dev';

Is it possibly to easily persist variables across the app? Without passing?

— asked December 7th 2010 by joshua vandergrift
  • constant
0 Comments

1 Answer

  • You can set Global variables using Ti.App, for example:

    Ti.App.API_SERVER = 'http://devserver.dev';
    

    Then you just need to use the Ti.App.API_SERVER wherever you want.

    — answered December 7th 2010 by Antonio Silveira
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.