Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7914] IOS: Calling Ti.UI.TableView.updateRow causes that row to loose the click event

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-04-04T15:45:40.000+0000
Affected Version/sRelease 1.8.2
Fix Version/sRelease 2.0.0, Sprint 2012-06
ComponentsiOS
LabelsIOS,, TableView, module_tableview, qe-testadded, updateRow
ReporterJon Barnhart
AssigneeStephen Tramer
Created2012-02-21T12:00:42.000+0000
Updated2012-04-04T15:45:40.000+0000

Description

Problem

After calling Ti.UI.TableView.updateRow(), the click event no longer fires.

Steps to reproduce

Make a project with the below app.js.

Click row 1

#* Notice that the click event fired by seeing the Ti.API.Info message "table row clicked"

Click the 'update row 1' button

Click row 1

#* Notice that the click event does not fire
var win1 = Ti.UI.createWindow({});


var data = [{title:'Row 1'}, {title:'Row 2'}];
var table = Ti.UI.createTableView({data:data});
win1.add(table);

table.addEventListener('click', TableClick);

function TableClick(evt)
{
  Ti.API.info('table row clicked');
}


var btn2 = Ti.UI.createButton({
  title:'update row 1',
  width:120,
  height:50,
  left:10,
  bottom:0
});
btn2.addEventListener('click',DoBtn2Click);
win1.add(btn2);

function DoBtn2Click()
{
  table.updateRow(0, table.data[0].rows[0]);
}

win1.open();

Comments

  1. Ivan Skugor 2012-02-22

    Although this seems like a bug, I don't understand why to update row with itself? That makes no sense, but could potentially cause that bug. Try to create new row and then update row at particular index ("update" may not be right word, "replace" IMHO suits better). Also, how did you managed to run iPhone simulator on Windows 7? :)
  2. Jon Barnhart 2012-02-22

    Ivan, "update" is the terminology used by Appcelerator not me. The updating line updates the row with itself for simplicity. You can change it to update with whatever you want to update it with and it still looses the event among other issues, also reported in a different ticket. Windows 7 was a copy/paste error. I have updated it. Thanks for the catch...however I sure do wish we could use the IOS simulator in Windows!!!!
  3. Shawn Lipscomb 2012-02-24

    Shak, this is a critical issue for us. We need to be able to update TableView rows and still see a click event on them.
  4. Stephanie Soniat 2012-03-07

    I've run into this, too. For a small table I was able to delete the rows and re-add them, but this will be a big problem with bigger tables.
  5. Shawn Lipscomb 2012-03-11

    Neeraj, I see the priority on this got bumped from Critical to Medium and then to High. Please reconsider the change and please move it back to Critical, which is defined here in JIRA as "Blocks Development" and "Production could not run". I think those terms describe this bug, since click events completely stop working. An app cannot be released like this, and any development work downstream of the updateRow() call is completely stalled. Thanks.
  6. Vishal Duggal 2012-03-13

    Resolved by PR #1647
  7. Satyam Sekhri 2012-03-16

    Closing bug. Verified fix on: SDK build: 2.0.0.v20120316093247 Titanium Studio, build: 2.0.0.201203152033 Device: iPhone4 (V4.3.5)
  8. Michael Pettiford 2012-04-04

    Reopening/closing to add/remove labels

JSON Source