Titanium JIRA Archive
Appcelerator Community (AC)

[AC-766] Alloy: Usage of Picker events in ListView crashes app

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionDuplicate
Resolution Date2015-09-29T03:52:58.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsalloy, crash, eventlistener, listview, picker
ReporterHans Knöchel
AssigneeShak Hossain
Created2015-03-07T16:10:06.000+0000
Updated2016-03-08T07:37:02.000+0000

Description

Picker events cannot be used inside the to be displayed in a ListView. The error is "undefined is not an object (evaluating 'e.__views.__alloyId91.addEventListener')". Test case:
<Alloy>
	<Window id="win" title="Picker in ListView">
		<ListView id="listView" onItemclick="handleListViewClick">
			<Templates>
				<ItemTemplate name="DateTimePicker">
					<Picker class="picker" onChange="setPickerValue" />
				</ItemTemplate>
			</Templates>
		</ListView>
	</Window>
</Alloy>
var section = Ti.UI.createListSection({
	items : [{
		template : "DateTimePicker",
		properties : {
			height : 200
		}
	}]
});

$.listView.setSections([section]);
$.win.open();

function setPickerValue(e) {
	Ti.API.warn(e);
}
".picker": {
	type: Titanium.UI.PICKER_TYPE_DATE_AND_TIME,
	height: 200
}

Attachments

FileDateSize
IMG_4643.PNG2015-03-11T11:50:30.000+000083959

Comments

  1. Shuo Liang 2015-03-11

    Hi, Please provide a test case to reproduce your problem. Here is a guide about how to create a test case for bug reporting. [http://docs.appcelerator.com/titanium/3.0/#!/guide/How_to_Submit_a_Bug_Report-section-29004732_HowtoSubmitaBugReport-CreatingaTestCase] Regards, Shuo
  2. Hans Knöchel 2015-03-11

    Thank you! I've added a detailed test case and the error screen that appears.

JSON Source