[TIMOB-1102] Picker not honoring the selected flag
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Medium |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2011-04-17T01:55:12.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | Release 1.4.0 |
| Components | iOS |
| Labels | defect, ios, iphone, picker |
| Reporter | ctredway |
| Assignee | Reggie Seagraves |
| Created | 2011-04-15T02:44:04.000+0000 |
| Updated | 2011-04-17T01:55:12.000+0000 |
Description
Pickers will not honor when setting the selected flag to true. The following code shows this behavior:
var column = Ti.UI.createPickerColumn();
column.addRow(Ti.UI.createPickerRow({title:'Bananas',custom_item:'b'}));
column.addRow(Ti.UI.createPickerRow({title:'Strawberries',custom_item:'s',selected:true}));
column.addRow(Ti.UI.createPickerRow({title:'Mangos',custom_item:'m'}));
column.addRow(Ti.UI.createPickerRow({title:'Grapes',custom_item:'g'}));
var picker =
Titanium.UI.createPicker({selectionIndicator:true});
picker.selectionIndicator = true;
picker.add(column);
(from [f4ffe06f6a1c140486a191399899616478e5fffb]) Closes #1102: Picker is order-dependent on having a certain property set first, so re-set all the others after it's done (yuck). This already affects other classes, which also have special code for order-dependence; maybe we should have an 'initialPropertyList' that allows certain properties to be set before others when configuring? http://github.com/appcelerator/titanium_mobile/commit/f4ffe06f6a1c140486a191399899616478e5fffb"> http://github.com/appcelerator/titanium_mobile/commit/f4ffe06f6a1c1...