{ "id": "101841", "key": "AC-2613", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2012-09-24T14:56:46.000+0000", "created": "2012-09-24T14:49:25.000+0000", "labels": [ "ios", "picker", "setColumns" ], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:41:42.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": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "**Not a bug: turns out thats the expected behavior - please close ticket**\r\n\r\nUsing the picker on iOS simulator, if you use setColumns() in a callback/timeout then it doesn't refresh the UI of the picker. See the example below.\r\n\r\nWhat you should see:\r\nYou should see \"one\", \"two\", \"three\" appear after 2.5 seconds and \"four\", \"five\", \"six\" appear after 5 seconds.\r\n\r\nWhat you see:\r\nNothing until 5 seconds has passed (when the picker.add() is called, then you see all the rows: \"one\", \"two\", \"three\", \"four\", \"five\", \"six\".\r\n\r\n{code:javascript} \r\n\r\nvar picker = Ti.UI.createPicker({\r\n\ttype:Ti.UI.PICKER_TYPE_PLAIN,\r\n\tcolumns: [Ti.UI.createPickerColumn()],\r\n\tselectionIndicator: true\r\n});\r\n\r\nsetTimeout(function () {\r\n\r\n\tvar col = \tTi.UI.createPickerColumn();\r\n\tcol.addRow(Ti.UI.createPickerRow({title:'one'});\r\n\tcol.addRow(Ti.UI.createPickerRow({title:'two'});\r\n\tcol.addRow(Ti.UI.createPickerRow({title:'three'});\r\n\tpicker.setColumns([col]);\r\n\r\n}, 2500);\r\n\r\n\r\nsetTimeout(function () {\r\n\r\n\tvar rows = [];\r\n\trows.push(Ti.UI.createPickerRow({title:'four'});\r\n\trows.push(Ti.UI.createPickerRow({title:'five'});\r\n\trows.push(Ti.UI.createPickerRow({title:'six'});\r\n\tpicker.add(rows);\r\n\r\n}, 5000);\t\t\r\n\r\n\r\n{code}", "attachment": [], "flagged": false, "summary": "picker .setColumns() doesn't update UI", "creator": { "name": "jimmyrocket", "key": "jimmyrocket", "displayName": "Jimmy Forrester-Fellowes", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "jimmyrocket", "key": "jimmyrocket", "displayName": "Jimmy Forrester-Fellowes", "active": true, "timeZone": "Europe/London" }, "environment": "OS X Lion & iOS simulator", "comment": { "comments": [ { "id": "220340", "author": { "name": "jimmyrocket", "key": "jimmyrocket", "displayName": "Jimmy Forrester-Fellowes", "active": true, "timeZone": "Europe/London" }, "body": "Not a bug: turns out thats the expected behavior - please close ticket", "updateAuthor": { "name": "jimmyrocket", "key": "jimmyrocket", "displayName": "Jimmy Forrester-Fellowes", "active": true, "timeZone": "Europe/London" }, "created": "2012-09-24T14:56:25.000+0000", "updated": "2012-09-24T14:56:25.000+0000" }, { "id": "220341", "author": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "body": "Talked with Jimmy on IRC, we sorted out that he needs to use reloadColumn instead", "updateAuthor": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "created": "2012-09-24T14:56:46.000+0000", "updated": "2012-09-24T14:56:46.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }