Titanium Community Questions & Answer Archive

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

What is this error?

Runtime error

Location [1,0] app://app.js
TypeError; Can not call method
setBackGroundColor of null(app://app.js#1)

I installed android sdk 2.2.
I compiled a distribution version and I had this error in the Galaxy tab.

What is this error?

— asked November 7th 2010 by Yoonju Chang
  • android
  • app.js
  • galaxy-tab
  • sdk2.2
0 Comments

1 Answer

  • I think it's must be setBackgroundColor instead setBackGroundColor (small g instead capital G)

    — answered November 8th 2010 by Triet BuiMinh
    permalink
    3 Comments
    • I used code, "Titanium.UI.setBackgroundColor('#000');".
      Message is "setBackGroundColor of null(app://app.js#1)", it means that "Titanium.UI" is null ?

      — commented November 8th 2010 by Yoonju Chang
    • Yoonju,
      Please paste the first 10 lines of your app.js code.

      — commented November 8th 2010 by Paul Dowsett
    • This is my app.js code.

      // this sets the background color of the master UIView (when there are no windows/tab groups on it)
      Titanium.UI.setBackgroundColor('#000');
      
      
      //
      // create base UI tab and root window
      //
      var win1 = Titanium.UI.createWindow({  
          title:'DMookHD',
          backgroundColor:'#fff'
      });
      
      Ti.include('main_window.js');
      win1.open();
      

      — commented November 8th 2010 by Yoonju Chang
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.