Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Titanium.UI.iPhone unknown

I have the following piece of code:


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.

— asked September 7th 2010 by Peter Griffin
  • an
  • iphone
  • not
  • object

2 Answers

  • Allright, deleting the build and create a complete rebuild fixed the problem. Sould have tried that earlier…

    — answered September 22nd 2010 by Peter Griffin
    • I'm getting a similar problem when i'm trying to compile my .ipa to distribute as an enterprise/ad-hoc one.

      If i test it on through xCode on my phone works fine, but when i do the distribute, get this error

      [ERROR] Application received error: 'undefined' is not an object (evaluating 'Ti.UI.iPhone.AnimationStyle.FLIP_FROM_LEFT')

      — commented December 26th 2012 by Rafael Cardoso
    • I got Ti.UI.iPhone.RowAnimationStyle.NONE undefined problem from the follow code


      Fixed it by removing the 'build' folder and rebuild.

      — commented February 16th 2013 by titanium studio
  • 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.

    — answered January 2nd 2013 by Rafael Cardoso
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.