I'm building an app that has a RSS feed, the feed updates once a day, so of course I only need to update if this is the first time of if the cache is stale. I decided to work with Ti.App.property because it seemed like the obvious way to do this, I have a Data array and it's perfect for that. so I wrote the following code to do that:
if (Ti.App.Properties.hasProperty('tblData')){ alert('hasProperty:true'); if (parseInt(Ti.UI.currentWindow.appStartTime)-parseInt(Date.now)>=1){ getData(); alert('cache stale'); }else{ alert('cache current'); reloadData(); } } else{ getData(); alert('hasProperty:false'); }and in the "xhr.onload" function I wrote the next line.
Ti.App.Properties.setList('tblData', tblData);however the next time the window loads I still get the
alert('hasProperty:false');
line.
anybody has a clue what's happening to my app's properties?