Titanium Community Questions & Answer Archive

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

Problem with grouped view

Hi,

I'm using source code from the KitchenSink in my app.js and I am always getting the following error when running my app.

[ERROR] Script Error = Result of expression 'Titanium.UI.iPhone.createGroupedSection' [undefined] is not a function. at app.js (line 1).

— asked March 22nd 2010 by Toby Hughes
  • 1.0
0 Comments

3 Answers

  • post the code is giving you troubles

    — answered March 22nd 2010 by Dan Tamas
    permalink
    0 Comments
  • var win = Titanium.UI.currentWindow;
    
    var buttonData = [
        {title:'Button 1'},
        {title:'Button 2'},
        {title:'Button 3'}
    
    ];
    
    var buttonSection = Titanium.UI.iPhone.createGroupedSection({
        footer:'Button Footer',
        header:'Button Header',
        type:'button',
        data:buttonData
    });
    
    var groupedView = Titanium.UI.iPhone.createGroupedView();
    groupedView.addSection(buttonSection);
    
    win.add(groupedView);
    
    — answered March 22nd 2010 by Toby Hughes
    permalink
    0 Comments
  • I believe the following files were included in KitchenSink by mistake:

    • grouped_view_basic.js

    • grouped_view_layout.js

    • grouped_views.js

    The createGroupedView and createGroupedSection functions are from earlier versions of Titanium and are no longer supported.

    In the most recent version you create grouped views with createTableView by setting the style property to Ti.UI.iPhone.TableViewStyle.GROUPED.

    See table_view_api_grouped.js for a working example.

    — answered March 22nd 2010 by James K
    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.