Appending data to an Array set with Titanium.App.Properties.setList('appwindows', appwindows);
I need some help; I am trying to append data to an empty array that has been set with Ti.App.Properties.setList.
in app.js I have the following lines:
var appwindows = [];
Titanium.App.Properties.setList('appwindows', appwindows);
Titanium.App.addEventListener( "UPDATE_WINDOW_ARRAY", function(win) {
//What do I need here to append string values to the array appwindows?
});
I can not seem to append data to the array, appwindows
Thank you in advance for assistance.
1 Answer
-
Accepted Answer
Michael
I believe have to getList(), assign it to a local array, add the new elements, and then assign the array back to the property using setList().