Getting the following error when trying to run my app. The line the error is refering to (line 32) is the very first line of the code below that is causing the error. any ideas?
[ERROR] Script Error = Result of expression 'Titanium.APP' [undefined] is not an object. at app.js (line 32).
code causing the error...
if(Titanium.APP.Properties.getString("storeUname") != null){ Ti.API.Info(storedUser); var storedUser = Titanium.APP.Properties.getString("username"); } if(Titanium.APP.Properties.getString("storePword") != null){ Ti.API.Info(storedPass); var storedPass = Titanium.APP.Properties.getString("password"); }
2 Answers
Accepted Answer
should be:
Titanium.App.Propertiesit's case sensitive :)
Danno's suggestion should help resolve the issue.. but it it doesn't.. lots of [undefined] errors stem from the context not being refreshed. Either touch the tiapp.xml..or clear the <project>/build/<iphone/android> directory and rebuild for a full re-build.
Your Answer
Think you can help? Login to answer this question!