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.
1 Answer
-
Accepted Answer
Use
Ti.App.Properties.setString("whereIam") Ti.App.Properties.getString("whereIam")