{ "id": "85599", "key": "TIMOB-7445", "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": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2017-05-24T21:15:05.000+0000", "created": "2012-01-26T19:06:13.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "parity" ], "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-24T21:15:05.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h2. Problem\r\n\r\nThe [Titanium.UI.Picker.setSelectedRow|http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI.Picker.setSelectedRow-method.html] method does not work unless the picker is rendered.\r\n\r\nNote that this works correctly on Android with 1.8.0.1.\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 exitOnClose: true,\r\n layout: 'vertical'\r\n});\r\n\r\nvar picker = Ti.UI.createPicker({\r\n top:50\r\n});\r\n\r\nvar data = [];\r\ndata[0]=Ti.UI.createPickerRow({title:'Bananas'});\r\ndata[1]=Ti.UI.createPickerRow({title:'Strawberries'});\r\ndata[2]=Ti.UI.createPickerRow({title:'Mangos'});\r\ndata[3]=Ti.UI.createPickerRow({title:'Grapes'});\r\n\r\npicker.add(data);\r\npicker.selectionIndicator = true;\r\n\r\nwin.add(picker);\r\npicker.setSelectedRow(0, 2, false); // move after win.open() to workaround issue\r\n\r\nwin.open();\r\n{code}\r\n\r\nh2. Discussions\r\n\r\nStramer stated in [this|https://github.com/appcelerator/titanium_mobile/pull/1269/files#r389725] comment that this is considered a bug.", "attachment": [], "flagged": false, "summary": "iOS: UI.Picker.setSelectedRow method does not work unless picker already rendered", "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* iOS5\r\n* iPhone Simulator", "comment": { "comments": [ { "id": "420377", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing this ticket as the issue cannot be reproduced with the following environment; \r\niPhone 7 (10.2) \r\nMacOS 10.11.6 (15G31) \r\nStudio 4.9.0.201705021158 \r\nTi SDK 6.1.0.v20170519131839 \r\nAppc NPM 4.2.9 \r\nAppc CLI 6.2.1 \r\nTi CLI 5.0.13 \r\nAlloy 1.9.11 \r\nArrow 2.0.0 \r\nXcode 8.2 (8C38) \r\nNode v4.8.2 \r\nJava 1.7.0_80", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-05-24T21:15:05.000+0000", "updated": "2017-05-24T21:15:05.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }