{ "id": "155892", "key": "TIMOB-20619", "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": "17706", "name": "Release 5.4.0", "archived": false, "released": true, "releaseDate": "2016-08-11" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-03-28T07:02:20.000+0000", "created": "2016-03-22T11:15:22.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "8.1", "TableViewRow", "Windows", "Windows-Phone", "appendRow", "eventlistener", "qe-5.4.0" ], "versions": [ { "id": "16997", "name": "Release 5.2.0", "archived": false, "released": true, "releaseDate": "2016-02-23" } ], "issuelinks": [], "assignee": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-06-21T18:47:39.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": "12642", "name": "Windows", "description": "Windows authoring support" } ], "description": "I have a table view and I am appending rows to it.\r\nWhen I click the default values of the table, the click listener is working fine but when I try to click the appended row item, it is exiting the app without any error or log.\r\nI have tried adding the event listener to the append row separately but it is also not working.\r\n\r\nBelow is my code\r\n\r\n{code:java}\r\nvar args = arguments[0] || {};\r\nvar toastMsg = require('toastMessage');\r\n//var limit = 10 ;\r\n$.topView.headerLabel.text = \"MESSAGES\";\r\n//$.topView.menuListImgRight.image = \"images/icons/internalScreenIcons/search.png\";\r\nvar lastPostId;\r\nvar allLoaded = false;\r\nvar sectionVal = 0;\r\n\r\nvar messageRefresh = function(e) {\r\n\r\n\tlistMessage();\r\n};\r\n\r\nTi.App.addEventListener(\"messageRefresh\", messageRefresh);\r\n\r\nvar TimelineMessageRefresh = function(e) {\r\n\r\n\tlistMessage();\r\n};\r\n$.getNext.addEventListener('click', function(e) {\r\n\tnextTen(Ti.App.Properties.getString('postid'));\r\n});\r\n\r\nTi.App.addEventListener(\"TimelineMessageRefresh\", TimelineMessageRefresh);\r\n\r\n//if (Alloy.Globals.offlineDetect()) {\r\nif (Ti.Network.networkTypeName == Ti.Network.NETWORK_NONE || Ti.Network.networkTypeName == Ti.Network.NETWORK_UNKNOWN) {\r\n\tTi.API.info(\"offline \");\r\n\tofflineList();\r\n} else {\r\n\tTi.API.info(\"online messagelist\");\r\n\tlistMessage();\r\n\r\n}\r\n\r\nfunction listMessage() {\r\n\r\n\tvar data = [];\r\n\tTi.API.info(\"Called \" + lastPostId);\r\n\r\n\tvar tableData = [];\r\n\tvar session = Ti.App.Properties.getString('sessionId');\r\n\tvar userid = Ti.App.Properties.getString('userId');\r\n\tvar _usergroup = [];\r\n\tvar _ug = \"?limit=0\";\r\n\tfor ( i = 0; i < Alloy.Globals.userGroup.length; i++) {\r\n\t\t_usergroup.push(Alloy.Globals.userGroup[i]);\r\n\t}\r\n\r\n\tfor (var i = 0; i < _usergroup.length; i++) {\r\n\t\t_ug = _ug + \"&userGroup=\" + _usergroup[i];\r\n\t\tTi.API.info(\"UG: \" + _ug);\r\n\t\tif (i == _usergroup.length - 1) {\r\n\r\n\t\t\tvar url = Alloy.CFG.api.base + Alloy.CFG.api.post + \"?limit=0&postType=1\";\r\n\t\t\tvar response;\r\n\r\n\t\t\tvar xhr = Ti.Network.createHTTPClient({\r\n\t\t\t\tonload : function() {\r\n\t\t\t\t\t// handle the response\r\n\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tresponse = this.responseText;\r\n\t\t\t\t\t\t//Ti.API.info(\"Response: \" + response);\r\n\t\t\t\t\t\tvar _response = JSON.parse(response);\r\n\t\t\t\t\t\tTi.API.info(\"_response 11 : \" + JSON.stringify(_response, null, 2));\r\n\r\n\t\t\t\t\t\tfor (var i = 0; i < _response.length; i++) {\r\n\t\t\t\t\t\t\tTi.App.Properties.setString('postid', _response[i].id);\r\n\t\t\t\t\t\t\tvar row = Ti.UI.createTableViewRow({\r\n\t\t\t\t\t\t\t\theight : '120dp'\r\n\t\t\t\t\t\t\t\t//top : \"50dp\"\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tvar imgView = Ti.UI.createImageView({\r\n\t\t\t\t\t\t\t\twidth : \"45dp\",\r\n\t\t\t\t\t\t\t\theight : \"45dp\",\r\n\t\t\t\t\t\t\t\tleft : \"15dp\",\r\n\t\t\t\t\t\t\t\ttop : \"10dp\",\r\n\t\t\t\t\t\t\t\timage : \"images/icons/homeScreenIcons/ViewResponses.png\"\r\n\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tvar container = Ti.UI.createView({\r\n\t\t\t\t\t\t\t\tleft : \"20%\",\r\n\t\t\t\t\t\t\t\tlayout : \"vertical\"\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tvar title = Ti.UI.createLabel({\r\n\t\t\t\t\t\t\t\ttext : _response[i].post,\r\n\t\t\t\t\t\t\t\tfont : {\r\n\t\t\t\t\t\t\t\t\tfontFamily : \"Century Gothic\",\r\n\t\t\t\t\t\t\t\t\tfontWeight : \"Bold\",\r\n\t\t\t\t\t\t\t\t\tfontSize : \"18dp\"\r\n\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\tcolor : \"#d01227\",\r\n\t\t\t\t\t\t\t\tleft : '0%',\r\n\t\t\t\t\t\t\t\twidth : '90%',\r\n\t\t\t\t\t\t\t\theight : '30%',\r\n\t\t\t\t\t\t\t\ttop : \"10dp\"\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tvar sendTo = Ti.UI.createLabel({\r\n\t\t\t\t\t\t\t\ttext : \"Sent to: \" + _response[i].sendTo,\r\n\t\t\t\t\t\t\t\tfont : {\r\n\t\t\t\t\t\t\t\t\tfontFamily : \"Century Gothic\",\r\n\t\t\t\t\t\t\t\t\tfontWeight : \"Normal\",\r\n\t\t\t\t\t\t\t\t\tfontSize : \"14dp\"\r\n\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\tcolor : \"#999999\",\r\n\t\t\t\t\t\t\t\ttop : '5dp',\r\n\t\t\t\t\t\t\t\tleft : '0dp',\r\n\t\t\t\t\t\t\t\twidth : '90%',\r\n\t\t\t\t\t\t\t\theight : '16dp'\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tvar date = Ti.UI.createLabel({\r\n\t\t\t\t\t\t\t\ttext : _response[i].updatedAtDate,\r\n\t\t\t\t\t\t\t\tfont : {\r\n\t\t\t\t\t\t\t\t\tfontFamily : \"Century Gothic\",\r\n\t\t\t\t\t\t\t\t\tfontWeight : \"Normal\",\r\n\t\t\t\t\t\t\t\t\tfontSize : \"14dp\"\r\n\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\tcolor : \"#999999\",\r\n\t\t\t\t\t\t\t\ttop : '6dp',\r\n\t\t\t\t\t\t\t\tleft : '0dp'\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\tvar border = Ti.UI.createView({\r\n\t\t\t\t\t\t\t\theight : \"2dp\",\r\n\t\t\t\t\t\t\t\ttop : \"110dp\",\r\n\t\t\t\t\t\t\t\tbackgroundColor : \"red\",\r\n\t\t\t\t\t\t\t\twidth : \"80%\"\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\tvar commentCount = Ti.UI.createLabel({\r\n\t\t\t\t\t\t\t\ttext : _response[i].commentCount + \" comments\",\r\n\t\t\t\t\t\t\t\tcolor : \"#999999\",\r\n\t\t\t\t\t\t\t\tbottom : '10%',\r\n\t\t\t\t\t\t\t\tright : '10%',\r\n\t\t\t\t\t\t\t\tfont : {\r\n\t\t\t\t\t\t\t\t\tfontFamily : \"Century Gothic\",\r\n\t\t\t\t\t\t\t\t\tfontWeight : \"Normal\",\r\n\t\t\t\t\t\t\t\t\tfontSize : \"14dp\"\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tcontainer.add(title);\r\n\t\t\t\t\t\t\tcontainer.add(sendTo);\r\n\t\t\t\t\t\t\tcontainer.add(date);\r\n\t\t\t\t\t\t\trow.add(container);\r\n\t\t\t\t\t\t\trow.add(imgView);\r\n\t\t\t\t\t\t\trow.add(border);\r\n\t\t\t\t\t\t\trow.add(commentCount);\r\n\t\t\t\t\t\t\t//row.postType = _response[i].postType;\r\n\t\t\t\t\t\t\trow.id = _response[i].id;\r\n\t\t\t\t\t\t\trow.info = _response[i].sendTo;\r\n\t\t\t\t\t\t\trow.name = _response[i].post;\r\n\t\t\t\t\t\t\trow.date = _response[i].updatedAtDate;\r\n\t\t\t\t\t\t\trow.comments = _response[i].commentCount;\r\n\r\n\t\t\t\t\t\t\ttableData.push(row);\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$.table.data = tableData;\r\n\t\t\t\t\t\t//Ti.API.info('messageDb:' + JSON.stringify(Alloy.Collections.messageDb.toJSON(), null, 2));\r\n\t\t\t\t\t} catch(e) {\r\n\t\t\t\t\t\talert(e);\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\tonerror : function(e) {\r\n\t\t\t\t\tTi.API.info(e.code);\r\n\t\t\t\t\tif (e.code == 401) {\r\n\t\t\t\t\t\tAlloy.createController('login/login').getView().open();\r\n\t\t\t\t\t\t//$.messageList.close();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t////alert(e.code);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\txhr.open('GET', url);\r\n\t\t\txhr.setRequestHeader(\"x-access-token\", session);\r\n\t\t\txhr.setRequestHeader(\"deviceid\", encrypt(\"c3ff7453a0b44a69\"));\r\n\t\t\txhr.setRequestHeader(\"userid\", encrypt(userid));\r\n\t\t\t//xhr.setRequestHeader(\"Content-Type\", \"application/json\");\r\n\r\n\t\t\txhr.send();\r\n\t\t}\r\n\t}\r\n}\r\n\r\n$.table.addEventListener('click', function(e) {\r\n\r\n\tTi.API.info(\"onclick msg : \" + JSON.stringify(e));\r\n\tvar data = {\r\n\r\n\t\tname : e.row.name,\r\n\t\tinfo : \"Sent to : \" + e.row.info,\r\n\t\tdate : e.row.date,\r\n\t\tid : e.row.id,\r\n\t\tcomments : e.row.comments + \" comments\"\r\n\t};\r\n\tTi.API.info(\"name 1 : \" + JSON.stringify(e.row.name));\r\n\tTi.API.info(\"date 1 : \" + JSON.stringify(e.row.date));\r\n\tTi.API.info(\"info 1 : \" + JSON.stringify(e.row.info));\r\n\tTi.API.info(\"id 1 : \" + JSON.stringify(e.row.id));\r\n\tAlloy.createController('viewResponse/commentList', data).getView().open(slide_it_left);\r\n\t//$.messageList.close();\r\n\r\n});\r\n\r\nfunction nextTen(lastPostId) {\r\n\r\n\tvar data = [];\r\n\tvar tableData = [];\r\n\tvar session = Ti.App.Properties.getString('sessionId');\r\n\tvar userid = Ti.App.Properties.getString('userId');\r\n\tvar _usergroup = [];\r\n\tvar _ug = \"?limit=\" + lastPostId;\r\n\tfor ( i = 0; i < Alloy.Globals.userGroup.length; i++) {\r\n\t\t_usergroup.push(Alloy.Globals.userGroup[i]);\r\n\t}\r\n\r\n\tfor (var i = 0; i < _usergroup.length; i++) {\r\n\t\t_ug = _ug + \"&userGroup=\" + _usergroup[i];\r\n\t\tTi.API.info(\"UG: \" + _ug);\r\n\t\tif (i == _usergroup.length - 1) {\r\n\r\n\t\t\tvar url = Alloy.CFG.api.base + Alloy.CFG.api.post + \"?limit=\" + lastPostId + \"&postType=1\";\r\n\t\t\tvar response;\r\n\r\n\t\t\tvar xhr = Ti.Network.createHTTPClient({\r\n\t\t\t\tonload : function() {\r\n\t\t\t\t\t// handle the response\r\n\t\t\t\t\tresponse = this.responseText;\r\n\t\t\t\t\t//Ti.API.info(\"Response: \" + response);\r\n\t\t\t\t\tvar _response = JSON.parse(response);\r\n\t\t\t\t\tTi.API.info(\"_response 22 : \" + JSON.stringify(_response, null, 2));\r\n\r\n\t\t\t\t\tif (_response.length > 0) {\r\n\t\t\t\t\t\tfor (var i = 0; i < _response.length; i++) {\r\n\t\t\t\t\t\t\tTi.App.Properties.setString('postid', _response[i].id);\r\n\r\n\t\t\t\t\t\t\tvar row = Ti.UI.createTableViewRow({\r\n\t\t\t\t\t\t\t\theight : '120dp'\r\n\t\t\t\t\t\t\t\t//top : \"50dp\"\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tvar imgView = Ti.UI.createImageView({\r\n\t\t\t\t\t\t\t\twidth : \"45dp\",\r\n\t\t\t\t\t\t\t\theight : \"45dp\",\r\n\t\t\t\t\t\t\t\tleft : \"15dp\",\r\n\t\t\t\t\t\t\t\ttop : \"10dp\",\r\n\t\t\t\t\t\t\t\timage : \"images/icons/homeScreenIcons/ViewResponses.png\"\r\n\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tvar container = Ti.UI.createView({\r\n\t\t\t\t\t\t\t\tleft : \"20%\",\r\n\t\t\t\t\t\t\t\tlayout : \"vertical\"\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tvar title = Ti.UI.createLabel({\r\n\t\t\t\t\t\t\t\ttext : _response[i].post,\r\n\t\t\t\t\t\t\t\tfont : {\r\n\t\t\t\t\t\t\t\t\tfontFamily : \"Century Gothic\",\r\n\t\t\t\t\t\t\t\t\tfontWeight : \"Bold\",\r\n\t\t\t\t\t\t\t\t\tfontSize : \"18dp\"\r\n\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\tcolor : \"#d01227\",\r\n\t\t\t\t\t\t\t\tleft : '0%',\r\n\t\t\t\t\t\t\t\twidth : '90%',\r\n\t\t\t\t\t\t\t\theight : '30%',\r\n\t\t\t\t\t\t\t\ttop : \"0dp\"\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tvar sendTo = Ti.UI.createLabel({\r\n\t\t\t\t\t\t\t\ttext : \"Sent to: \" + _response[i].sendTo,\r\n\t\t\t\t\t\t\t\tfont : {\r\n\t\t\t\t\t\t\t\t\tfontFamily : \"Century Gothic\",\r\n\t\t\t\t\t\t\t\t\tfontWeight : \"Normal\",\r\n\t\t\t\t\t\t\t\t\tfontSize : \"14dp\"\r\n\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\tcolor : \"#999999\",\r\n\t\t\t\t\t\t\t\ttop : '5dp',\r\n\t\t\t\t\t\t\t\tleft : '0dp',\r\n\t\t\t\t\t\t\t\twidth : '90%',\r\n\t\t\t\t\t\t\t\theight : '16dp'\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tvar date = Ti.UI.createLabel({\r\n\t\t\t\t\t\t\t\ttext : _response[i].updatedAtDate,\r\n\t\t\t\t\t\t\t\tfont : {\r\n\t\t\t\t\t\t\t\t\tfontFamily : \"Century Gothic\",\r\n\t\t\t\t\t\t\t\t\tfontWeight : \"Normal\",\r\n\t\t\t\t\t\t\t\t\tfontSize : \"14dp\"\r\n\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\tcolor : \"#999999\",\r\n\t\t\t\t\t\t\t\ttop : '6dp',\r\n\t\t\t\t\t\t\t\tleft : '0dp'\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\tvar border = Ti.UI.createView({\r\n\t\t\t\t\t\t\t\theight : \"2dp\",\r\n\t\t\t\t\t\t\t\ttop : \"115dp\",\r\n\t\t\t\t\t\t\t\tbackgroundColor : \"red\",\r\n\t\t\t\t\t\t\t\twidth : \"80%\"\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\tvar commentCount = Ti.UI.createLabel({\r\n\t\t\t\t\t\t\t\ttext : _response[i].commentCount + \" comments\",\r\n\t\t\t\t\t\t\t\tcolor : \"#999999\",\r\n\t\t\t\t\t\t\t\tbottom : '10%',\r\n\t\t\t\t\t\t\t\tright : '10%',\r\n\t\t\t\t\t\t\t\tfont : {\r\n\t\t\t\t\t\t\t\t\tfontFamily : \"Century Gothic\",\r\n\t\t\t\t\t\t\t\t\tfontWeight : \"Normal\",\r\n\t\t\t\t\t\t\t\t\tfontSize : \"14dp\"\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tcontainer.add(title);\r\n\t\t\t\t\t\t\tcontainer.add(sendTo);\r\n\t\t\t\t\t\t\tcontainer.add(date);\r\n\t\t\t\t\t\t\trow.add(container);\r\n\t\t\t\t\t\t\trow.add(imgView);\r\n\t\t\t\t\t\t\trow.add(border);\r\n\t\t\t\t\t\t\trow.add(commentCount);\r\n\t\t\t\t\t\t\t//row.postType = _response[i].postType;\r\n\t\t\t\t\t\t\trow.id = _response[i].id;\r\n\t\t\t\t\t\t\trow.name = _response[i].post;\r\n\t\t\t\t\t\t\trow.info = _response[i].sendTo;\r\n\t\t\t\t\t\t\trow.date = _response[i].updatedAtDate;\r\n\t\t\t\t\t\t\trow.comments = _response[i].commentCount;\r\n\t\t\t\t\t\t\ttableData.push(row);\r\n\r\n\t\t\t\t\t\t\trow.addEventListener('click', function(e) {\r\n\t\t\t\t\t\t\t\tTi.API.info(\"onclick inside nextten msg : \" + JSON.stringify(e));\r\n\t\t\t\t\t\t\t\tvar data = {\r\n\r\n\t\t\t\t\t\t\t\t\tname : e.row.name,\r\n\t\t\t\t\t\t\t\t\tinfo : e.row.info,\r\n\t\t\t\t\t\t\t\t\tdate : e.row.date,\r\n\t\t\t\t\t\t\t\t\tid : e.row.id,\r\n\t\t\t\t\t\t\t\t\tcomments : e.row.comments + \" comments\"\r\n\t\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\t\tTi.API.info(\"name 1 : \" + JSON.stringify(e.row.name));\r\n\t\t\t\t\t\t\t\tTi.API.info(\"date 1 : \" + JSON.stringify(e.row.date));\r\n\t\t\t\t\t\t\t\tTi.API.info(\"info 1 : \" + JSON.stringify(e.row.info));\r\n\t\t\t\t\t\t\t\tTi.API.info(\"id 1 : \" + JSON.stringify(e.row.id));\r\n\t\t\t\t\t\t\t\tAlloy.createController('viewResponse/commentList', data).getView().open(slide_it_left);\r\n\t\t\t\t\t\t\t\t//$.messageList.close();\r\n\r\n\t\t\t\t\t\t\t\talert(\"inside row onclick\");\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$.table.appendRow(tableData);\r\n\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tallLoaded = true;\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t},\r\n\t\t\t\tonerror : function(e) {\r\n\t\t\t\t\tTi.API.info(e.code);\r\n\t\t\t\t\tif (e.code == 401) {\r\n\t\t\t\t\t\tAlloy.createController('login/login').getView().open();\r\n\t\t\t\t\t\t//$.messageList.close();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t////alert(e.code);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\txhr.open('GET', url);\r\n\t\t\txhr.setRequestHeader(\"x-access-token\", session);\r\n\t\t\txhr.setRequestHeader(\"deviceid\", encrypt(\"c3ff7453a0b44a69\"));\r\n\t\t\txhr.setRequestHeader(\"userid\", encrypt(userid));\r\n\t\t\t//xhr.setRequestHeader(\"Content-Type\", \"application/json\");\r\n\r\n\t\t\txhr.send();\r\n\t\t}\r\n\t}\r\n}\r\n\r\n\r\n{code}\r\n\r\n ", "attachment": [], "flagged": false, "summary": "Windows: App crash on click eventlistener of appended row of tableview", "creator": { "name": "paramsb", "key": "paramsb", "displayName": "Parmeet Singh", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "paramsb", "key": "paramsb", "displayName": "Parmeet Singh", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "SDK 5.2.0.GA\r\nOS : Windows phone 8.1", "closedSprints": [ { "id": 614, "state": "closed", "name": "2016 Sprint 07 SDK", "startDate": "2016-03-26T00:38:56.432Z", "endDate": "2016-04-09T00:38:00.000Z", "completeDate": "2016-04-11T04:41:08.231Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "380362", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, \r\n\r\nPlease provide a minimal sample code which generate the issue that you described. The code you provided has additional components which makes the code hard to understand and test it in our environment. Please reduce the code to a smaller one which generates the issue. Also, please provide the complete steps to follow for regenerating the issue. \r\n\r\nThanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-03-22T14:23:59.000+0000", "updated": "2016-03-22T14:23:59.000+0000" }, { "id": "380486", "author": { "name": "paramsb", "key": "paramsb", "displayName": "Parmeet Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Sharif, \r\n I am adding the dummy code for your reference \r\n\r\n\r\n{code:java}\r\nvar args = arguments[0] || {};\r\nvar data = [];\r\nvar tableData = [];\r\n$.getNext.addEventListener('click', function(e) {\r\n\tnextTen();\r\n});\r\n\r\nlisting();\r\n\r\n$.table.addEventListener('click', function(e) {\r\n\talert(\"testing onClick\");\r\n});\r\n\r\nfunction listing() {\r\n\tfor (var i = 0; i < 10; i++) {\r\n\t\tTi.API.info(\"inside\");\r\n\r\n\t\tvar row = Ti.UI.createTableViewRow({\r\n\t\t\theight : '120dp'\r\n\t\t});\r\n\t\tvar imgView = Ti.UI.createImageView({\r\n\t\t\twidth : \"45dp\",\r\n\t\t\theight : \"45dp\",\r\n\t\t\tleft : \"15dp\",\r\n\t\t\ttop : \"10dp\",\r\n\t\t\timage : \"images/icons/homeScreenIcons/ViewResponses.png\"\r\n\t\t});\r\n\t\tvar container = Ti.UI.createView({\r\n\t\t\tleft : \"20%\",\r\n\t\t\tlayout : \"vertical\"\r\n\t\t});\r\n\t\tvar title = Ti.UI.createLabel({\r\n\t\t\ttext : \"_response[i].post \" + i,\r\n\t\t\tfont : {\r\n\t\t\t\tfontFamily : \"Century Gothic\",\r\n\t\t\t\tfontWeight : \"Bold\",\r\n\t\t\t\tfontSize : \"18dp\"\r\n\t\t\t},\r\n\t\t\tcolor : \"#000\",\r\n\t\t\tleft : '0%',\r\n\t\t\twidth : '90%',\r\n\t\t\theight : Ti.UI.SIZE,\r\n\t\t\ttop : \"10dp\"\r\n\t\t});\r\n\t\tvar sendTo = Ti.UI.createLabel({\r\n\t\t\ttext : \" _response[i].sendTo\",\r\n\t\t\tfont : {\r\n\t\t\t\tfontFamily : \"Century Gothic\",\r\n\t\t\t\tfontWeight : \"Normal\",\r\n\t\t\t\tfontSize : \"14dp\"\r\n\t\t\t},\r\n\t\t\tcolor : \"#999999\",\r\n\t\t\ttop : '5dp',\r\n\t\t\tleft : '0dp',\r\n\t\t\twidth : '90%',\r\n\t\t\theight : Ti.UI.SIZE,\r\n\t\t});\r\n\t\tvar date = Ti.UI.createLabel({\r\n\t\t\ttext : \"_response[i].updatedAtDate\",\r\n\t\t\tfont : {\r\n\t\t\t\tfontFamily : \"Century Gothic\",\r\n\t\t\t\tfontWeight : \"Normal\",\r\n\t\t\t\tfontSize : \"14dp\"\r\n\t\t\t},\r\n\t\t\tcolor : \"#999999\",\r\n\t\t\ttop : '6dp',\r\n\t\t\tleft : '0dp'\r\n\t\t});\r\n\t\tvar border = Ti.UI.createView({\r\n\t\t\theight : \"2dp\",\r\n\t\t\ttop : \"110dp\",\r\n\t\t\tbackgroundColor : \"red\",\r\n\t\t\twidth : \"80%\"\r\n\t\t});\r\n\t\tvar commentCount = Ti.UI.createLabel({\r\n\t\t\ttext : \"_response[i].commentCount \",\r\n\t\t\tcolor : \"#999999\",\r\n\t\t\tbottom : '10%',\r\n\t\t\tright : '10%',\r\n\t\t\tfont : {\r\n\t\t\t\tfontFamily : \"Century Gothic\",\r\n\t\t\t\tfontWeight : \"Normal\",\r\n\t\t\t\tfontSize : \"14dp\"\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tcontainer.add(title);\r\n\t\tcontainer.add(sendTo);\r\n\t\tcontainer.add(date);\r\n\t\trow.add(container);\r\n\t\trow.add(imgView);\r\n\t\trow.add(border);\r\n\t\trow.add(commentCount);\r\n\t\t\r\n\t\ttableData.push(row);\r\n\r\n\t}\r\n\t$.table.data = tableData;\r\n}\r\n\r\nfunction nextTen(lastPostId) {\r\n\r\n\tvar data = [];\r\n\tvar tableData = [];\r\n\r\n\tfor (var i = 0; i < 10; i++) {\r\n\r\n\t\tvar row = Ti.UI.createTableViewRow({\r\n\t\t\theight : '120dp'\r\n\t\t\t//top : \"50dp\"\r\n\t\t});\r\n\t\tvar imgView = Ti.UI.createImageView({\r\n\t\t\twidth : \"45dp\",\r\n\t\t\theight : \"45dp\",\r\n\t\t\tleft : \"15dp\",\r\n\t\t\ttop : \"10dp\",\r\n\t\t\timage : \"images/icons/homeScreenIcons/ViewResponses.png\"\r\n\t\t});\r\n\t\tvar container = Ti.UI.createView({\r\n\t\t\tleft : \"20%\",\r\n\t\t\tlayout : \"vertical\"\r\n\t\t});\r\n\t\tvar title = Ti.UI.createLabel({\r\n\t\t\ttext : \"_response[i].post\" + i,\r\n\t\t\tfont : {\r\n\t\t\t\tfontFamily : \"Century Gothic\",\r\n\t\t\t\tfontWeight : \"Bold\",\r\n\t\t\t\tfontSize : \"18dp\"\r\n\t\t\t},\r\n\t\t\tcolor : \"#d01227\",\r\n\t\t\tleft : '0%',\r\n\t\t\twidth : '90%',\r\n\t\t\theight : Ti.UI.SIZE,\r\n\t\t\ttop : \"0dp\"\r\n\t\t});\r\n\t\tvar sendTo = Ti.UI.createLabel({\r\n\t\t\ttext : \"_response[i].sendTo\",\r\n\t\t\tfont : {\r\n\t\t\t\tfontFamily : \"Century Gothic\",\r\n\t\t\t\tfontWeight : \"Normal\",\r\n\t\t\t\tfontSize : \"14dp\"\r\n\t\t\t},\r\n\t\t\tcolor : \"#999999\",\r\n\t\t\ttop : '5dp',\r\n\t\t\tleft : '0dp',\r\n\t\t\twidth : '90%',\r\n\t\t\theight : Ti.UI.SIZE,\r\n\t\t});\r\n\t\tvar date = Ti.UI.createLabel({\r\n\t\t\ttext : \"_response[i].updatedAtDate\",\r\n\t\t\tfont : {\r\n\t\t\t\tfontFamily : \"Century Gothic\",\r\n\t\t\t\tfontWeight : \"Normal\",\r\n\t\t\t\tfontSize : \"14dp\"\r\n\t\t\t},\r\n\t\t\tcolor : \"#999999\",\r\n\t\t\ttop : '6dp',\r\n\t\t\tleft : '0dp'\r\n\t\t});\r\n\t\tvar border = Ti.UI.createView({\r\n\t\t\theight : \"2dp\",\r\n\t\t\ttop : \"115dp\",\r\n\t\t\tbackgroundColor : \"red\",\r\n\t\t\twidth : \"80%\"\r\n\t\t});\r\n\t\tvar commentCount = Ti.UI.createLabel({\r\n\t\t\ttext : \" _response[i].commentCount\",\r\n\t\t\tcolor : \"#999999\",\r\n\t\t\tbottom : '10%',\r\n\t\t\tright : '10%',\r\n\t\t\tfont : {\r\n\t\t\t\tfontFamily : \"Century Gothic\",\r\n\t\t\t\tfontWeight : \"Normal\",\r\n\t\t\t\tfontSize : \"14dp\"\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tcontainer.add(title);\r\n\t\tcontainer.add(sendTo);\r\n\t\tcontainer.add(date);\r\n\t\trow.add(container);\r\n\t\trow.add(imgView);\r\n\t\trow.add(border);\r\n\t\trow.add(commentCount);\r\n\t\ttableData.push(row);\r\n\r\n\t}\r\n\t$.table.appendRow(tableData);\r\n}\r\n$.index.open();\r\n\r\n{code}\r\n\r\n========================================================================\r\nAnd the XML Code is : \r\n========================================================================\r\n\r\n\r\n{code:java}\r\n\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n\r\n{code}\r\n\r\n", "updateAuthor": { "name": "paramsb", "key": "paramsb", "displayName": "Parmeet Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-03-23T08:35:16.000+0000", "updated": "2016-03-23T08:35:16.000+0000" }, { "id": "380771", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Confirmed that it's fixed in latest master. TableView and ListView had big data model changes recently in TIMOB-19961 which is scheduled to release in 5.4.0. Since our code was bit messy and we had big changes there, I would like to move this ticket to 5.4.0. Does this sound good [~cwilliams] ?\r\n\r\nTest code (classic app)\r\n\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: 'green',\r\n layout: 'vertical'\r\n});\r\nvar button = Ti.UI.createButton({\r\n width: Ti.UI.FILL,\r\n height: '10%',\r\n title:'PUSH'\r\n});\r\n\r\nvar table = Ti.UI.createTableView({\r\n width: Ti.UI.FILL, height: '80%'\r\n});\r\nvar data = [];\r\n\r\nfunction listing() {\r\n for (var i = 0; i < 10; i++) {\r\n Ti.API.info(\"inside\");\r\n\r\n var row = Ti.UI.createTableViewRow({\r\n height: '120dp'\r\n , rowId_test: 'test_' + i\r\n });\r\n var imgView = Ti.UI.createImageView({\r\n width: \"45dp\",\r\n height: \"45dp\",\r\n left: \"15dp\",\r\n top: \"10dp\",\r\n image: \"images/icons/homeScreenIcons/ViewResponses.png\"\r\n });\r\n var container = Ti.UI.createView({\r\n left: \"20%\",\r\n layout: \"vertical\"\r\n });\r\n var title = Ti.UI.createLabel({\r\n text: \"_response[i].post \" + i,\r\n font: {\r\n fontFamily: \"Century Gothic\",\r\n fontWeight: \"Bold\",\r\n fontSize: \"18dp\"\r\n },\r\n color: \"#000\",\r\n left: '0%',\r\n width: '90%',\r\n height: Ti.UI.SIZE,\r\n top: \"10dp\"\r\n });\r\n var sendTo = Ti.UI.createLabel({\r\n text: \" _response[i].sendTo\",\r\n font: {\r\n fontFamily: \"Century Gothic\",\r\n fontWeight: \"Normal\",\r\n fontSize: \"14dp\"\r\n },\r\n color: \"#999999\",\r\n top: '5dp',\r\n left: '0dp',\r\n width: '90%',\r\n height: Ti.UI.SIZE,\r\n });\r\n var date = Ti.UI.createLabel({\r\n text: \"_response[i].updatedAtDate\",\r\n font: {\r\n fontFamily: \"Century Gothic\",\r\n fontWeight: \"Normal\",\r\n fontSize: \"14dp\"\r\n },\r\n color: \"#999999\",\r\n top: '6dp',\r\n left: '0dp'\r\n });\r\n var border = Ti.UI.createView({\r\n height: \"2dp\",\r\n top: \"110dp\",\r\n backgroundColor: \"red\",\r\n width: \"80%\"\r\n });\r\n var commentCount = Ti.UI.createLabel({\r\n text: \"_response[i].commentCount \",\r\n color: \"#999999\",\r\n bottom: '10%',\r\n right: '10%',\r\n font: {\r\n fontFamily: \"Century Gothic\",\r\n fontWeight: \"Normal\",\r\n fontSize: \"14dp\"\r\n }\r\n });\r\n\r\n container.add(title);\r\n container.add(sendTo);\r\n container.add(date);\r\n row.add(container);\r\n row.add(imgView);\r\n row.add(border);\r\n row.add(commentCount);\r\n\r\n data.push(row);\r\n\r\n }\r\n table.data = data;\r\n}\r\nfunction nextTen(lastPostId) {\r\n var tableData = [];\r\n for (var i = 0; i < 10; i++) {\r\n\r\n var row = Ti.UI.createTableViewRow({\r\n height: '120dp'\r\n , rowId_test: 'test_' + (lastPostId + i)\r\n\r\n });\r\n var imgView = Ti.UI.createImageView({\r\n width: \"45dp\",\r\n height: \"45dp\",\r\n left: \"15dp\",\r\n top: \"10dp\",\r\n image: \"images/icons/homeScreenIcons/ViewResponses.png\"\r\n });\r\n var container = Ti.UI.createView({\r\n left: \"20%\",\r\n layout: \"vertical\"\r\n });\r\n var title = Ti.UI.createLabel({\r\n text: \"_response[i].post\" + i,\r\n font: {\r\n fontFamily: \"Century Gothic\",\r\n fontWeight: \"Bold\",\r\n fontSize: \"18dp\"\r\n },\r\n color: \"#d01227\",\r\n left: '0%',\r\n width: '90%',\r\n height: Ti.UI.SIZE,\r\n top: \"0dp\"\r\n });\r\n var sendTo = Ti.UI.createLabel({\r\n text: \"_response[i].sendTo\",\r\n font: {\r\n fontFamily: \"Century Gothic\",\r\n fontWeight: \"Normal\",\r\n fontSize: \"14dp\"\r\n },\r\n color: \"#999999\",\r\n top: '5dp',\r\n left: '0dp',\r\n width: '90%',\r\n height: Ti.UI.SIZE,\r\n });\r\n var date = Ti.UI.createLabel({\r\n text: \"_response[i].updatedAtDate\",\r\n font: {\r\n fontFamily: \"Century Gothic\",\r\n fontWeight: \"Normal\",\r\n fontSize: \"14dp\"\r\n },\r\n color: \"#999999\",\r\n top: '6dp',\r\n left: '0dp'\r\n });\r\n var border = Ti.UI.createView({\r\n height: \"2dp\",\r\n top: \"115dp\",\r\n backgroundColor: \"red\",\r\n width: \"80%\"\r\n });\r\n var commentCount = Ti.UI.createLabel({\r\n text: \" _response[i].commentCount\",\r\n color: \"#999999\",\r\n bottom: '10%',\r\n right: '10%',\r\n font: {\r\n fontFamily: \"Century Gothic\",\r\n fontWeight: \"Normal\",\r\n fontSize: \"14dp\"\r\n }\r\n });\r\n\r\n container.add(title);\r\n container.add(sendTo);\r\n container.add(date);\r\n row.add(container);\r\n row.add(imgView);\r\n row.add(border);\r\n row.add(commentCount);\r\n tableData.push(row);\r\n data.push(row);\r\n\r\n }\r\n table.appendRow(tableData);\r\n}\r\ntable.addEventListener('click', function (e) {\r\n alert(JSON.stringify(data[e.index].rowId_test));\r\n});\r\nbutton.addEventListener('click', function () {\r\n nextTen(data.length);\r\n})\r\nwin.addEventListener('open', function () {\r\n listing();\r\n});\r\nwin.add(button);\r\nwin.add(table);\r\nwin.open();\r\n{code}\r\n\r\n", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-03-28T07:02:20.000+0000", "updated": "2016-03-28T07:02:20.000+0000" }, { "id": "380793", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "Given that this fix was in a much larger refactor of the TableView/ListView code, I'm ok with just assigning it to 5.4.0 rather than trying to extract out the exact change that fixed the behavior for 5.3.0 release. Users needing this fix will have to use builds off master for now... {{appc ti idk install -b master}}", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2016-03-28T14:58:15.000+0000", "updated": "2016-03-28T14:58:15.000+0000" }, { "id": "388767", "author": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "body": "Verified as fixed.\r\nTested on:\r\nMicrosoft Lumia 640 (8.1)\r\nWindows Simulator (8.1)\r\nMicrosoft Lumia 640 (10)\r\nWindows Simulator (10)\r\nWindows 10 Pro\r\nStudio: 4.7.0.201606150733\r\nTi SDK: 5.4.0.v20160617074028\r\nAppc NPM: 4.2.7-2\r\nApp CLI: 5.4.0-18\r\nNode v4.4.4\r\n*Closing Ticket.*", "updateAuthor": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "created": "2016-06-21T18:47:01.000+0000", "updated": "2016-06-21T18:47:01.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }