Titanium Community Questions & Answer Archive

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

Test working in iPad Simulator not on iPad

Hi!

I am new onboard and I'm trying out a few things that do not seem to work. I'd appreciate any and all pointers!

I have written an app which works fine in the iPad Simulator, but when I install it on the iPad it freezes with no error message. If I open the project in Xcode and attempt to compile and run it I am able to see the error messages.

The errors trigger when I use either of the following calls:

var ui = Ti.UI;
var win = ui.createWindow({
   backgroundColor:'red'
});

or

var tabGroup = Ti.UI.createTabGroup({});
[WARN] attempted to load: TiUITabGroupProxy
[ERROR] Script Error = invalid method (createTabGroup) passed to UIModule at app.js (line 1).
[ERROR] application received error: invalid method (createTabGroup) passed to UIModule at app.js (line 1)
— asked July 22nd 2010 by Jeremy Moncho
  • ipad
0 Comments

2 Answers

  • Try to use the full names, sometimes the 'Ti' variable is not available in all the functions scope

    var win  = Titanium.UI.createWindow({ 
       backgroundColor:'#f00'
    })
    

    Also keep the colors in hexa 3 or 6 digits ( #F00 or #FF0000)

    — answered July 22nd 2010 by Dan Tamas
    permalink
    1 Comment
    • I still have the same issue using the full name :(

      — commented July 22nd 2010 by Jeremy Moncho
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.