Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1102] Picker not honoring the selected flag

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:55:12.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.4.0
ComponentsiOS
Labelsdefect, ios, iphone, picker
Reporterctredway
AssigneeReggie Seagraves
Created2011-04-15T02:44:04.000+0000
Updated2011-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);

Comments

  1. Jeff Haynie 2011-04-15

    (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...

JSON Source