{ "id": "76203", "key": "TIMOB-5535", "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": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-06-13T00:45:18.000+0000", "created": "2011-06-10T02:52:01.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "mnegadaylov", "key": "mnegadaylov", "displayName": "Maxim Negadaylov", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-09T20:06:23.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": "11500", "name": "MobileWeb", "description": "Mobile Web (HTML) Platform" } ], "description": "When visibleItems property is defined in picker and visibleItems > 1 object i can not get value of picker.getSelectedRow(0).title. The javascript error occurs: Uncaught TypeError: Cannot read property 'title' of undefined. When visibleItems == 1 everything works fine. \r\n{code:JavaScript}\r\nvar win = Ti.UI.currentWindow;\r\nwin.backgroundColor = '#EEE';\r\n\r\nvar imageView = Ti.UI.createImageView({\r\n\tleft: 48,\r\n\ttop: 70,\r\n\twidth: 225,\r\n\theight: 225,\r\n\tbackgroundColor: '#888'\r\n});\r\n\r\nwin.add(imageView);\r\n\r\nimages = [Titanium.UI.createPickerRow({title:'0.jpg'}),\r\n\t\t Titanium.UI.createPickerRow({title:'1.jpg'}),\r\n\t\t Titanium.UI.createPickerRow({title:'2.jpg'}),\r\n\t\t Titanium.UI.createPickerRow({title:'3.jpg'}),\r\n\t\t Titanium.UI.createPickerRow({title:'4.jpg'})];\r\n\r\nvar picker = Titanium.UI.createPicker({\r\n\ttop: 10,\r\n\tleft: 10,\r\n\twidth: 140,\r\n\theight: 40,\r\n\tvisibleItems:2\r\n});\r\n\r\nvar closeButton = Ti.UI.createButton({\r\n\ttitle:'Close',\r\n\theight:40,\r\n\twidth:140,\r\n\tfontSize: 20,\r\n\ttop:10,\r\n\tleft: 160\r\n});\r\n\r\n\r\nwin.add(closeButton);\r\nwin.add(picker);\r\npicker.add(images);\r\nimageView.image = '/images/imageview/' + picker.getSelectedRow(0).title;\r\n\r\ncloseButton.addEventListener('click', function(){\r\n\tTitanium.UI.currentWindow.close();\r\n});\r\n\r\n\r\npicker.addEventListener('change', function(e){\r\n\timageView.image = '/images/imageview/' + e.selectedValue;\r\n});\r\n{code} ", "attachment": [], "flagged": false, "summary": "MobileWeb: Error occurs when using property visibleItems in Picker object.", "creator": { "name": "mvasko", "key": "mvasko", "displayName": "Misha Vasko", "active": true, "timeZone": "Europe/Kiev" }, "subtasks": [], "reporter": { "name": "mvasko", "key": "mvasko", "displayName": "Misha Vasko", "active": true, "timeZone": "Europe/Kiev" }, "environment": null, "comment": { "comments": [ { "id": "410410", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fixed.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-09T20:06:23.000+0000", "updated": "2017-03-09T20:06:23.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }