Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-691] Android: updateRow doesn't work if the table row has headers

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionDuplicate
Resolution Date2012-07-30T10:25:42.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sn/a
ComponentsAndroid
Labelsapi
ReporterMark Peace
AssigneeNeeraj Gupta
Created2011-04-15T02:34:35.000+0000
Updated2017-03-22T21:27:40.000+0000

Description

When a tableview (in android 2.1) has headers in its rows, updateRow fails with an array out of bounds error (the same table updates fine when the headers are removed).

As in the following code:


var LogFind = Ti.UI.createTableView({
data: [
{ header: 'Details', title: 'Tag', hasChild: true, color: 'black', url: 'LogFind/LogFind.js' }, 
{ title: 'Comment', hasChild:true, color: 'black', url: 'LogFind/LogFind.js' }, 
{ header: 'Images', title: 'Picture 1', hasChild:true, color: 'black', url: 'LogFind/LogFind.js' }, 
{ title: 'Picture 2', hasChild: true, color: 'black', url: 'LogFind/LogFind.js' }, 
{ title: 'Picture 3', hasChild: true, color: 'black', url: 'LogFind/LogFind.js' }, 
{ name:'GPS', header: 'Commands', title: 'GPS', color: 'black', url: 'LogFind/LogFind.js' },
{ title: 'Submit', hasChild: true, color: 'black', url: 'LogFind/LogFind.js' }
]
})
LogFind.addEventListener ('click', function(e) {
   alert((e.index))
})
var win = Titanium.UI.createWindow ({
   backgroundColor: 'white'
});
win.add(LogFind);
win.open();
LogFind.updateRow(5, { title: 'Getting GPS...' });

Comments

  1. Ivan Skugor 2012-07-26

  2. Karl Rowley 2012-07-30

    The fix for [TIMOB-9072] corrects this. I ran the test code included in this ticket wit the fix for [TIMOB-9072] and it works as expected.
  3. Lee Morris 2017-03-22

    Closing as duplicate with regards to the information provided elsewhere in this ticket.

JSON Source