Titanium Community Questions & Answer Archive

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

Tableview style problem

Hi, here is my code for a tableview. But it doesn't work. It returns me

Titanium.UI.iPhone.TableViewStyle[undefined] is not an object

My code:

var win = Titanium.UI.currentWindow;

var data=[
{title:'Language:                                                                        ENGLISH', hasChilde:true, header:'Appearance'},
{title:'Allow Streaming ', header:'Streaming'}
];

var tableView=Titanium.UI.createTableView({
    data:data,
    style: Titanium.UI.iPhone.TableViewStyle.GROUPED
});
win.add(tableView);

anyone can help me? thanks!!!

— asked August 31st 2010 by Haoming Cheng
  • an
  • error
  • not
  • object
  • style
  • tableview
0 Comments

1 Answer

  • Accepted Answer

    var data=[
    {title:'Language:                                                                       ENGLISH', hasChilde:true, header:'Appearance'},
    {title:'Allow Streaming ', header:'Streaming'}
    ];
    

    Should be:

    var data = [
    {title:'Language: ENGLISH', hasChild:true, header:'Appearance'},
    {title:'Allow Streaming ', header:'Streaming'}
    ];
    
    — answered August 31st 2010 by Colton Arabsky
    permalink
    0 Comments
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.