[TIMOB-2968] iOS: TableViewRow.rightImage is attached to wrong row
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-10-27T15:42:54.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Sprint 2011-31, Release 1.8.0 |
Components | iOS |
Labels | rightimage, row, tableview |
Reporter | yu-ji |
Assignee | Stephen Tramer |
Created | 2011-04-15T03:33:54.000+0000 |
Updated | 2011-10-27T15:42:54.000+0000 |
Description
I use rightImage at only for a part of TableViewRow.
TableViewRow.rightImage is attached to wrong row..
I coded following lines.
//example.js
var win = Ti.UI.currentWindow;
var tableView = Ti.UI.createTableView();
for(var i=0;i<20;i++) {
var row = Ti.UI.createTableViewRow({
isChecked: false
});
row.add(Ti.UI.createLabel({
text: 'line' + (i + 1),
left: 10
}));
tableView.appendRow(row);
}
tableView.addEventListener('click', function(e) {
setTimeout(function() {
if(e.row.isChecked) {
e.row.rightImage = '';
e.row.isChecked = false;
}else{
e.row.rightImage = 'images/check.png';
e.row.isChecked = true;
}
// this is hack for not update rightImage
e.row.title = e.row.title;
}, 300);
});
win.add(tableView);
- Show this window.
- Click a row.(The rightImage attaches correct row.)
- Scroll down.
- Scroll up(and down, up, down, up..)
- The rightImage attaches to the line not clicked.
The rightImage has some other strange things..
Associated Helpdesk Ticket:
appc.me/c/APP-647841Will not be solved by any layout fixes. Table rows are "special".
Tested On: Mac OSX Lion TiMob: 1.8.0.v20110819142548 TiStud: 1.0.4.201108101535 Devices: iPhone 4 version 4.2.10 iPad2 version 4.3.5 iPod 3