[TIMOB-28240] Android: TableViewRow unable to change colour of row after a set time (Regression)
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | None |
| Status | Closed |
| Resolution | Unresolved |
| Affected Version/s | Release 9.3.0 |
| Fix Version/s | Release 9.3.0 |
| Components | Android |
| Labels | n/a |
| Reporter | Samir Mohammed |
| Assignee | Gary Mathews |
| Created | 2020-11-12T13:54:54.000+0000 |
| Updated | 2020-11-20T00:24:15.000+0000 |
Description
Note* This error is only seen in the following PR https://github.com/appcelerator/titanium_mobile/pull/12029
Table view rows colour does not disappear after a few seconds but on 9.2.2.GA and iOS it does.
*Test Case:*
var win = Ti.UI.createWindow();
var myTableView = Ti.UI.createTableView();
var row = Ti.UI.createTableViewRow({
height:80,
backgroundColor:'#c00',
});
myTableView.appendRow(row);
win.add(myTableView);
win.addEventListener('open',function(){
setTimeout(function(){
Ti.API.debug(JSON.stringify(myTableView));
var tableRows = myTableView.data[0].rows;
Ti.API.debug(JSON.stringify(tableRows));
tableRows.pop(); // returns the error org.mozilla.javascript.EcmaError: TypeError: Cannot find default value for object.
myTableView.data = tableRows;
},2000); // two seconds after the window opens, remove the red row
});
/* you can swap out the open event listener with this one to see my alternative also fail
win.addEventListener('open',function(){
setTimeout(function(){
Ti.API.debug(JSON.stringify(myTableView));
var tableRows = myTableView.sections[0].rows; // returns the error Message: Java class "java.util.ArrayList" has no public instance field or method named "0".
Ti.API.debug(JSON.stringify(tableRows));
tableRows.pop();
myTableView.data = tableRows;
},2000); // two seconds after the window opens, remove the red row
});
*/
win.open();
*Test Steps:*
No comments