[TIMOB-267] Set Data on Grouped Section Causes crash
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:52:32.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Backlog |
Components | iOS |
Labels | n/a |
Reporter | Nolan Wright |
Assignee | Blain Hamon |
Created | 2011-04-15T02:26:24.000+0000 |
Updated | 2012-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);
I've got a hunch on what happened here, but it's all moot with 1.x and therefore, no longer a crasher.