[AC-766] Alloy: Usage of Picker events in ListView crashes app
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Resolved |
Resolution | Duplicate |
Resolution Date | 2015-09-29T03:52:58.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | alloy, crash, eventlistener, listview, picker |
Reporter | Hans Knöchel |
Assignee | Shak Hossain |
Created | 2015-03-07T16:10:06.000+0000 |
Updated | 2016-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
File | Date | Size |
---|---|---|
IMG_4643.PNG | 2015-03-11T11:50:30.000+0000 | 83959 |
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
Thank you! I've added a detailed test case and the error screen that appears.