Titanium.UI.iPhone unknown
I have the following piece of code:
tabGroup.open({
transition:Titanium.UI.iPhone.AnimationStyle.FLIP_FROM_LEFT
}
);
But for some reason, it doesn't know Titanium.UI.iPhone :S :
Result of expression 'Titanium.UI.iPhone' [undefined] is nog an object. at app.js (line 63)
Anyone knows how to fix this?
These lines are working perfect in the kitchenSink application.
2 Answers
-
Allright, deleting the build and create a complete rebuild fixed the problem. Sould have tried that earlier…
-
So I had the same problem.
I had the following code:
var AppTabGroup = require('ui/AppTabGroup'); AppTabGroup().open({transition: Titanium.UI.iPhone && Titanium.UI.iPhone.AnimationStyle.FLIP_FROM_LEFT});
If i run it through Xcode on my device would work fine, but if I archived and run it as an AdHoc I would get the error.
[ERROR] Application received error: 'undefined' is not an object (evaluating 'Ti.UI.iPhone.AnimationStyle.FLIP_FROM_LEFT')
I removed the first "Titanium.UI.iPhone" and now i have the code like:
var AppTabGroup = require('ui/AppTabGroup'); AppTabGroup().open({transition: Titanium.UI.iPhone.AnimationStyle.FLIP_FROM_LEFT})
and it works fine now. So the first "Titanium.UI.iPhone" was the problem. Not sure why it would work if i Run on my Device and it wouldnt work if I create the Adhoc. Go figure.