Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-267] Set Data on Grouped Section Causes crash

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:52:32.000+0000
Affected Version/sn/a
Fix Version/sBacklog
ComponentsiOS
Labelsn/a
ReporterNolan Wright
AssigneeBlain Hamon
Created2011-04-15T02:26:24.000+0000
Updated2012-10-02T03:10:26.000+0000

Description

When you do set data with a control instance = crash

  <script type="text/javascript">
    function doSetData() {
        groupedSection.setData(tempData2);
    }
    
        //Titanium.UI.currentWindow.addEventListener('focused',doSetData);
        var switchInstance = Titanium.UI.createSwitch({value:true,width:95});
        var switchInstance2 = Titanium.UI.createSwitch({value:true,width:95});
        
        var buttonRefresh = Titanium.UI.createButton({
            systemButton:Titanium.UI.iPhone.SystemButton.REFRESH
        });
        
        buttonRefresh.addEventListener('click',function() {
            doSetData();
        })
       var tempData2 = [
            {title:'Item2', input:switchInstance2}
        ];

        var tempData = [
            {title:'Item', input:switchInstance}
        ];
        
        
        var groupedSection = Titanium.UI.iPhone.createGroupedSection({
            header:'Temp section',
            type:'input',
            data:tempData
        });
        
        var groupedView = Titanium.UI.iPhone.createGroupedView();
        groupedView.addSection(groupedSection);
        
        Titanium.UI.currentWindow.addView(groupedView);
        Titanium.UI.currentWindow.showView(groupedView);
        Titanium.UI.currentWindow.setRightNavButton(buttonRefresh);

Comments

  1. Blain Hamon 2011-04-15

    I've got a hunch on what happened here, but it's all moot with 1.x and therefore, no longer a crasher.

JSON Source