Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16347] iOS: SectionHeader - Clicking on TableViewSection with custom properties throws a runtime error

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 3.2.0, Release 3.2.1
Fix Version/sn/a
ComponentsiOS
Labelsqe-3.2.1, reprod
ReporterWilson Luu
AssigneeUnknown
Created2014-01-30T21:24:17.000+0000
Updated2018-02-28T20:04:14.000+0000

Description

*Details:* Clicking on TableViewSection with custom properties throws a runtime error. *This is not a regression since this occurs with 3.2.0.GA* *Steps to reproduce:* 1. Install the following app.js to an iOS device:
var _window = Ti.UI.createWindow();
var tableData = [];
var s = 0;
var nRow = 0;

for (var i = 0; i < 100; i++) {
	var createNewSection = (i + 1) % 10 == 9 || i == 0 ? true : false;
	createNewSection ? nRow = 1 : nRow++;
	tableData.push({
		title : 'Row #' + nRow + ' Index #' + i + ' Section #' + s,
		customProp : 'Hello World! #' + i,
		header : createNewSection ? 'Section #' + s++ : null
	});
}
var table = Ti.UI.createTableView({
	data : tableData
});
_window.add(table);

table.addEventListener('longpress', function(e) {
	Ti.API.info('Section:    ' + e.section);
	Ti.API.info('Row:        ' + e.row);
	Ti.API.info('Row Data:   ' + e.rowData);
	Ti.API.info('Index:      ' + e.index);
	Ti.API.info('customProp: ' + e.rowData.customProp);

});
_window.open(); 
2. After app is launched, long press on a section header *Actual:* A runtime error is thrown (see attachments). *Expected:* The following should be displayed in xcode console
[INFO] Section:    [object TiUITableViewSection]
[INFO] Row:        [object TiUITableViewRow]
[INFO] Row Data:   [object TiUITableViewRow]
[INFO] Index:      4
[INFO] customProp: Hello World! #4

Attachments

FileDateSize
runtime_error.txt2014-01-30T21:24:17.000+0000368
Screenshot 2014.01.30 13.10.36.png2014-01-30T21:24:17.000+0000109194

Comments

  1. Shameer Jan 2014-08-28

    Issue still exists with SDK Version 3.2.1 and 3.4.0 Titanium Command-Line Interface, CLI version 3.3.0, Titanium SDK version 3.2.1.GA Titanium SDK version 3.4.0.GA Appcelerator Studio, build: 3.3.0.201407111535 iOS SDK: 7.0.3
  2. Lee Morris 2017-06-20

    I am able to reproduce this issue with the following environment; iPhone 7 (10.2) Studio 4.9.0.201705302345 Ti SDK 6.1.1.v20170620103414 Appc NPM 4.2.9 Appc CLI 6.2.1 Ti CLI 5.0.13 Alloy 1.9.11 Arrow 2.0.0 Xcode 8.2 (8C38) Node v4.8.2 Java 1.8.0_131

JSON Source