Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-28240] Android: TableViewRow unable to change colour of row after a set time (Regression)

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionUnresolved
Affected Version/sRelease 9.3.0
Fix Version/sRelease 9.3.0
ComponentsAndroid
Labelsn/a
ReporterSamir Mohammed
AssigneeGary Mathews
Created2020-11-12T13:54:54.000+0000
Updated2020-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:*

Create a Ti application

Add the code above into the application

Run the app

*Expected result* Row should go from red to white after a few seconds. *Actual result* Row colour does not change.

Comments

No comments

JSON Source