Is this possible to add custom property in Titanium.UI.PickerRow?
In code below, I want to add custom property "index" (using applyProperties PickerRow method)
var daysRows = [];
for (var i = 0, j = days.length; i < j; i++) {
var currentRow = Ti.UI.createPickerRow({
title : days[i],
});
//adding custom property to identify selection
currentRow.applyProperties({index:i});
daysRows.push(currentRow);
};
But when iterating through that PickerRow object later, I could not get custom property index. What I am seeing is only Titanium properties title.
I am using code below to iterate available properties.
button.addEventListener('click', function(e) {
..............
var selectedRow = picker.getSelectedRow(2);
for (var k in selectedRow) {
Ti.API.info('key is: ' + k + ', value is: ' + selectedRow[k]);
}
});
What am I doing wrong? Is there any way I can add custom property in PickerRow?
This is Titanium/Appcelerator issue in Android platform.
This issue seen in Titanium SDK 3.1.1 and not fixed in 3.1.2 August 2013 release.
jira.appcelerator.org/browse/TIMOB-14285 is now closed. This operation should work Release 6.1.0 onwards.