{ "id": "85505", "key": "TIMOB-7414", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2017-05-02T22:04:20.000+0000", "created": "2012-01-25T19:51:58.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [ { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" } ], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-05-02T22:04:20.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10224", "name": "TiAPI", "description": "This component is used for cross-platform API work. Specifications are most likely to use this component." } ], "description": "h2. Property\r\n\r\nThe [Titanium.UI.PickerRow.selected|http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI.PickerRow.selected-property.html] property does not currently work for either iOS or Android, despite being used in the KitchenSink. Thus, determine the future of this property, and raise platform tickets to address the issues if necessary.\r\n\r\nAs a workaround, use the picker method, [Titanium.UI.Picker.setSelectedRow|http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI.Picker.setSelectedRow-method.html].\r\n\r\n\r\nh2. Test Case\r\n\r\n{code:lang=javascript|title=app.js}\r\nTi.UI.backgroundColor = 'white';\r\nvar win = Ti.UI.createWindow({\r\n\texitOnClose: true,\r\n\tlayout: 'vertical'\r\n});\r\n\r\nvar picker = Ti.UI.createPicker({\r\n\ttop:50\r\n});\r\nvar data = [];\r\ndata[0]=Ti.UI.createPickerRow({title:'Bananas'});\r\ndata[1]=Ti.UI.createPickerRow({title:'Strawberries', selected: true}); // selected property does not work\r\ndata[2]=Ti.UI.createPickerRow({title:'Mangos'});\r\ndata[3]=Ti.UI.createPickerRow({title:'Grapes'});\r\npicker.add(data);\r\npicker.selectionIndicator = true;\r\nwin.add(picker);\r\nwin.open();\r\n// picker.setSelectedRow(0, 2, false); // uncomment to test on Android. This must be wrapped in setTimeout() on iOS, as it won't take effect unless the picker has been rendered\r\n{code}\r\n\r\n\r\n", "attachment": [], "flagged": false, "summary": "TiAPI: UI.PickerRow selected property does not work on iOS and Android", "creator": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "environment": "* Titanium 1.8.0.1\r\n* Android 2.2\r\n* iOS 5\r\n* iPhone Simulator iOS 5\r\n* Android Emulator 2.2", "comment": { "comments": [ { "id": "418924", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Resolving ticket as Invalid as there is now a new version of Kitchen Sink available and we no longer support the version which relates to this ticket.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-05-02T22:04:20.000+0000", "updated": "2017-05-02T22:04:20.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }