{ "id": "130976", "key": "ALOY-1033", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "11113", "key": "ALOY", "name": "Alloy", "projectCategory": { "id": "10400", "description": "Tools for developing applications", "name": "Tooling" } }, "fixVersions": [ { "id": "15909", "description": "Alloy 1.5.0", "name": "Alloy 1.5.0", "archived": false, "released": true, "releaseDate": "2014-09-29" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-09-12T13:47:32.000+0000", "created": "2014-05-28T18:21:12.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [ { "id": "15758", "description": "Alloy 1.4.0", "name": "Alloy 1.4.0", "archived": false, "released": true, "releaseDate": "2014-07-17" }, { "id": "15759", "description": "Alloy 1.3.1", "name": "Alloy 1.3.1", "archived": false, "released": true, "releaseDate": "2014-02-10" } ], "issuelinks": [], "assignee": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "updated": "2014-09-15T08:58:44.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": "12326", "name": "XML", "description": "View XML and parsing" } ], "description": "One option for enabling list view searching is to set the {{searchView}} property of the list equal to a reference to the SearchBar component. \r\n\r\n*Expectation*\r\n\r\nI should be able to set this property as an attribute of the {{}} tag in the XML.\r\n\r\n*Actual*\r\n\r\nAs demonstrated by the attached app, doing so throws this error:\r\n\r\n{code}\r\n[ERROR] Script Error {\r\n[ERROR] backtrace = \"#0 () at file:///Users/tpoulsen/Library/Application%20Support/iPhone%20Simulator/7.1/Applications/D10A7127-56CA-485E-99C7-FE9A5C9DDD60/ListViewSearch.app/alloy.js:231\";\r\n[ERROR] line = 95;\r\n[ERROR] message = \"Invalid type passed to function\";\r\n[ERROR] nativeLocation = \"-[TiUIListView setSearchView_:] (TiUIListView.m:746)\";\r\n[ERROR] nativeReason = \"expected: TiUISearchBarProxy or nil, was: String\";\r\n[ERROR] sourceId = 259295456;\r\n[ERROR] sourceURL = \"file:///Users/tpoulsen/Library/Application%20Support/iPhone%20Simulator/7.1/Applications/D10A7127-56CA-485E-99C7-FE9A5C9DDD60/ListViewSearch.app/alloy/controllers/index.js\";\r\n[ERROR] } \r\n{code}\r\n\r\n*Reason and workaround*\r\n\r\nThe attribute's value is being passed as a string to the ListView component, rather than as a reference to the component with that ID. As a workaround, you can set the searchView property in the controller.", "attachment": [ { "id": "48424", "filename": "ListViewSearch.zip", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-05-28T18:21:12.000+0000", "size": 5906989, "mimeType": "application/zip" } ], "flagged": false, "summary": "ListView searchView property throws error if set in XML", "creator": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "environment": null, "closedSprints": [ { "id": 117, "state": "closed", "name": "2014 Sprint 11 Alloy", "startDate": "2014-05-27T16:00:55.737Z", "endDate": "2014-06-07T04:00:00.000Z", "completeDate": "2014-06-09T14:18:58.490Z", "originBoardId": 124 }, { "id": 206, "state": "closed", "name": "2014 Sprint 18 Alloy", "startDate": "2014-09-02T13:23:09.065Z", "endDate": "2014-09-16T13:23:00.000Z", "completeDate": "2014-09-15T12:25:31.379Z", "originBoardId": 124 } ], "comment": { "comments": [ { "id": "306895", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "PR: https://github.com/appcelerator/alloy/pull/422\r\n\r\nTest app: test/apps/testing/ALOY-1033\r\n\r\nFunctional test:\r\n\r\n1. Run the app (should see no errors in console or app). Tap in the search box and search for items (should work).\r\n2. Edit the app's index.xml to move the within the . Run the app and it should work as before.", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-05-29T20:06:39.000+0000", "updated": "2014-05-29T20:06:39.000+0000" }, { "id": "306960", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "Tested Tim's PR, functional tests passed.", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2014-05-30T03:42:39.000+0000", "updated": "2014-05-30T03:42:39.000+0000" }, { "id": "307005", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "PR merged", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-05-30T14:22:57.000+0000", "updated": "2014-05-30T14:22:57.000+0000" }, { "id": "323262", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "This is an SDK issue, not Alloy.\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: 'blue',\r\n fullscreen: false\r\n});\r\n\r\n// Use action bar search view\r\nvar search = Ti.UI.Android.createSearchView({\r\n hintText: \"Table Search\",\r\n top: 0\r\n});\r\n\r\nwin.add(search);\r\n\r\nvar listView = Ti.UI.createListView({\r\n\tsearchView: search, /* comment this out & it runs*/\r\n\ttop: 40\r\n});\r\nvar sections = [];\r\n\r\nvar fruitSection = Ti.UI.createListSection({ headerTitle: 'Fruits'});\r\nvar fruitDataSet = [\r\n {properties: { title: 'Apple'}},\r\n {properties: { title: 'Banana'}},\r\n];\r\nfruitSection.setItems(fruitDataSet);\r\nsections.push(fruitSection);\r\n\r\nvar vegSection = Ti.UI.createListSection({ headerTitle: 'Vegetables'});\r\nvar vegDataSet = [\r\n {properties: { title: 'Carrots'}},\r\n {properties: { title: 'Potatoes'}},\r\n];\r\nvegSection.setItems(vegDataSet);\r\nsections.push(vegSection);\r\n\r\nlistView.sections = sections;\r\nwin.add(listView);\r\nwin.open();\r\n{code}\r\n\r\nCrashes in the same way.", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-09-12T13:16:17.000+0000", "updated": "2014-09-12T13:16:17.000+0000" }, { "id": "323265", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "Master: https://github.com/appcelerator/alloy/pull/554\r\n1_5_X: https://github.com/appcelerator/alloy/pull/555\r\n\r\nUpdate the test app to reflect the platform differences, such that the SearchBar is outside the list for iOS and inside the list for Android.\r\n", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2014-09-12T13:38:13.000+0000", "updated": "2014-09-12T13:38:13.000+0000" }, { "id": "323269", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "PRs tested and merged", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-09-12T13:47:32.000+0000", "updated": "2014-09-12T13:47:32.000+0000" }, { "id": "323598", "author": { "name": "vchidambaram", "key": "vchidambaram", "displayName": "Visalakshi Chidambaram", "active": true, "timeZone": "Asia/Shanghai" }, "body": "Verified in the following environment : 
\r\nAppcelerator Studio, build: 3.4.0.201409131030\r\nCLI: 3.4.0-rc3\r\nAlloy: 1.5.0-rc2 \r\nCode processor: 1.1.1 \r\nSDK: 3.4.0.v20140913174915\r\nMac OSX version 10.9.4\r\nXcode: Xcode 6 GM seed\r\nWindows 8.1 \r\nDevice: ipad (ios8) and samsung galaxy (4.4.2)", "updateAuthor": { "name": "vchidambaram", "key": "vchidambaram", "displayName": "Visalakshi Chidambaram", "active": true, "timeZone": "Asia/Shanghai" }, "created": "2014-09-15T08:58:44.000+0000", "updated": "2014-09-15T08:58:44.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }