var PageLoad = true;
I have a file named properties.js which holds this value and i need to change this value into false when a button is clicked. The button is in another JS file.
How can i do it?
var appDir = Titanium.Filesystem.getApplicationDataDirectory();
var propertiesFile = Titanium.Filesystem.getFile(appDir, 'properties.js');
propertiesFile.write("These is the contents");
What should i write??
I would recommend using the Properties methods that are provided by Titanium to solve this problem instead of reading and writing files yourself
http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.App.Properties-module