{ "id": "103471", "key": "TIMOB-13055", "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": [ { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "15396", "description": "2013 Sprint 07 Core", "name": "2013 Sprint 07 Core", "archived": true, "released": true, "releaseDate": "2013-04-08" }, { "id": "15105", "description": "2013 Sprint 07", "name": "2013 Sprint 07", "archived": true, "released": true, "releaseDate": "2013-04-08" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-04-01T17:20:36.000+0000", "created": "2012-10-16T10:39:51.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "qe-testadded", "triage" ], "versions": [ { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "15396", "description": "2013 Sprint 07 Core", "name": "2013 Sprint 07 Core", "archived": true, "released": true, "releaseDate": "2013-04-08" }, { "id": "15105", "description": "2013 Sprint 07", "name": "2013 Sprint 07", "archived": true, "released": true, "releaseDate": "2013-04-08" } ], "issuelinks": [ { "id": "23888", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "103474", "key": "TIMOB-11841", "fields": { "summary": "Android: 'longclick' event data not filled (x, y ...)", "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" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-04-19T11:09: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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "On android, when firing an event on a tableview, not all events a correctly filled with \"row\" property.\r\nOnly click directly on the row (not subview) and longpress are.\r\nOther events like should be filled to\r\n{code}\r\nvar win = Ti.UI.createWindow();\r\nwin.backgroundColor = 'white';\r\nvar data = [];\r\n\r\nfor (var x=0;x<4;x++)\r\n{\r\n\tvar label = Ti.UI.createLabel({\r\n\t\ttext:'Row Label ' + x,\r\n\t\theight:'auto',\r\n\t\twidth:'auto',\r\n\t\tcolor:'#336699',\r\n\t\tleft:10\r\n\t});\r\n\tvar row = Ti.UI.createTableViewRow({height:50});\r\n\trow.add(label);\r\n\tdata.push(row);\r\n}\r\n\r\n// create table view\r\nvar tableview = Titanium.UI.createTableView({\r\n\tdata:data\r\n});\r\n\r\nfunction log(e) {\r\n if (e.row)\r\n Ti.API.info('we got row property for event ' + e.type);\r\n}\r\ntableview.addEventListener('longpress', log);\r\ntableview.addEventListener('swipe', log);\r\ntableview.addEventListener('touchstart', log);\r\ntableview.addEventListener('touchend', log);\r\ntableview.addEventListener('touchcancel', log);\r\n\r\nwin.add(tableview);\r\nwin.open();\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "Android: tableview events: missing \"row\" property", "creator": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "environment": "titanium 3.1.0 master\r\nandroid 4.0.3\r\ndevice / simulator", "comment": { "comments": [ { "id": "223895", "author": { "name": "janhelleman", "key": "janhelleman", "displayName": "Jan Helleman", "active": true, "timeZone": "Europe/Berlin" }, "body": "I can second this issue. The object passed to the click event is the actual clicked object, not the row. For me there is no way to identify which row was clicked, and right now I cannot access any extra parameters added to the row, without extra coding...", "updateAuthor": { "name": "janhelleman", "key": "janhelleman", "displayName": "Jan Helleman", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-10-16T22:26:22.000+0000", "updated": "2012-10-16T22:26:22.000+0000" }, { "id": "231613", "author": { "name": "fidojones", "key": "fidojones", "displayName": "Lorenzo", "active": true, "timeZone": "America/Los_Angeles" }, "body": "same problem here, no e.row.id in longpress click, so I can't identify it.", "updateAuthor": { "name": "fidojones", "key": "fidojones", "displayName": "Lorenzo", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-12-17T08:04:20.000+0000", "updated": "2012-12-17T08:04:20.000+0000" }, { "id": "231614", "author": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "body": "Actually i fixed this in my branch. Will have to point the commits and make a pull request out of it", "updateAuthor": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "created": "2012-12-17T08:30:17.000+0000", "updated": "2012-12-17T08:30:17.000+0000" }, { "id": "238488", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Martin: Do you have a pull request ready for this yet? Thanks!", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-02-13T23:48:12.000+0000", "updated": "2013-02-13T23:48:12.000+0000" }, { "id": "238523", "author": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "body": "here you go\nhttps://github.com/appcelerator/titanium_mobile/pull/3872\n\nBut read the details, i also changed the method to get the current row", "updateAuthor": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "created": "2013-02-14T08:14:46.000+0000", "updated": "2013-02-14T08:14:46.000+0000" }, { "id": "242571", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Fill row information for all events fired from TableViewRowProxy\r\n\r\nhttps://github.com/appcelerator/titanium_mobile/pull/3975", "updateAuthor": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-03-16T10:49:28.000+0000", "updated": "2013-03-16T10:49:28.000+0000" }, { "id": "244203", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/4039", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-26T23:06:08.000+0000", "updated": "2013-03-26T23:06:08.000+0000" }, { "id": "244632", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Expanded test case that checks the source of the event as well.\n\n{code}\nvar win = Ti.UI.createWindow();\nwin.backgroundColor = 'white';\nvar data = [];\n \nfor (var x=0;x<4;x++)\n{\n var label = Ti.UI.createLabel({\n text:'Row Label ' + x,\n height:'40 dp',\n width:'80%',\n color:'white',\n backgroundColor:'blue',\n left:10\n });\n var row = Ti.UI.createTableViewRow({height:'50 dp'});\n row.add(label);\n data.push(row);\n}\n \n// create table view\nvar tableview = Titanium.UI.createTableView({\n data:data\n});\n \nfunction log(e) {\n if (e.row)\n Ti.API.info('we got row property for event ' + e.type +' '+e.source);\n}\ntableview.addEventListener('longpress', log);\ntableview.addEventListener('swipe', log);\ntableview.addEventListener('touchstart', log);\ntableview.addEventListener('touchend', log);\ntableview.addEventListener('touchcancel', log);\ntableview.addEventListener('click', log);\n \nwin.add(tableview);\nwin.open();\n{code}", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-03-29T04:36:45.000+0000", "updated": "2013-03-29T04:36:45.000+0000" }, { "id": "244916", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "https://github.com/appcelerator/titanium_mobile/pull/4039 merged", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-04-01T17:20:36.000+0000", "updated": "2013-04-01T17:20:36.000+0000" }, { "id": "245754", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Additional null check https://github.com/appcelerator/titanium_mobile/pull/4078", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-04T18:11:58.000+0000", "updated": "2013-04-04T18:11:58.000+0000" }, { "id": "245755", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "backport: https://github.com/appcelerator/titanium_mobile/pull/4079", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-04T18:17:51.000+0000", "updated": "2013-04-04T18:17:51.000+0000" }, { "id": "246140", "author": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "body": "All events defined for row in app.js are being logged now.\r\nEnvironment used for verification -\r\nSDK: 3.1.0.v20130405170202\r\nStudio:3.1.0.201304011603\r\nDevice: Samsung GALAXY tab (3.2) and Samsung Galaxy Nexus Android 4.0.2", "updateAuthor": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-06T10:09:41.000+0000", "updated": "2013-04-06T10:09:41.000+0000" }, { "id": "248333", "author": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Added the testcase in the testsuite under TableView.", "updateAuthor": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-04-19T11:08:45.000+0000", "updated": "2013-04-19T11:08:45.000+0000" } ], "maxResults": 13, "total": 13, "startAt": 0 } } }