Titanium Community Questions & Answer Archive

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

Global variable value; change on CloseWindow

I have a variable called "whereIam", it's start with "home" value, the main idea is when open a new Window the value change to "single". This must happen when I close the single Window recently Open with: Ti.UI.currentWindow.close();.

My current code for this:

btnHome.addEventListener('click', function() {    
    whereIam = 'home';
    Ti.UI.currentWindow.close();
    whereIam = 'home';
});

But doesn't work! :(, any ideas ?. Very thanks in advanced.

— asked July 21st 2010 by Esteban Fernandez
  • mobile
  • variables
0 Comments

1 Answer

  • Accepted Answer

    Use

    Ti.App.Properties.setString("whereIam")
    Ti.App.Properties.getString("whereIam")
    
    — answered July 21st 2010 by Daniel Lim
    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.