{ "id": "80712", "key": "TIMOB-5386", "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": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2019-04-04T18:04:07.000+0000", "created": "2011-09-28T16:39:51.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "api", "reprod" ], "versions": [ { "id": "11570", "description": "", "name": "Release 1.7.2", "archived": true, "released": true, "releaseDate": "2011-07-21" }, { "id": "11331", "description": "", "name": "Release 1.8.0", "archived": true, "released": true, "releaseDate": "2011-10-31" }, { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" }, { "id": "15856", "description": "Release 3.2.1", "name": "Release 3.2.1", "archived": false, "released": true, "releaseDate": "2014-02-10" } ], "issuelinks": [], "assignee": { "name": "ahutton", "key": "ahutton", "displayName": "Alan Hutton", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2019-04-04T18:04:07.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h3. Problem\r\n\r\nIf you add four rows to the first section of a table view, sometimes on the simulator,ipod, or ipad 1 & 2 appear different in the sections of a tableview. If you add only two rows everything is fine, when adding four new rows two are added to the correct section, the other two to the following.\r\n \r\nh3. Reproducible steps:\r\n \r\n1.Run the code below.\r\n\r\nFollowing should now happen: If you click the first \"Show all\" row (First section, first row), then rows with News 1.1 huhuhuhu, News1.2 will be appended in the first section and 1.3 & 1.4 will be new first rows in the second section.\r\n\r\nIf you do the same with the second section, then everything will be alright, because only two addional rows will be appended.\r\n \r\nh3. Expected behavior\r\n\r\nCustomer wants to add four rows to the first section of the table view.\r\n\r\nh3. Sample Code:\r\n\r\n{code}\r\n\r\n//Here's the first window...\r\nvar first = Ti.UI.createWindow({\r\n backgroundColor:\"#fff\",\r\n title:\"My App\"\r\n});\r\n\r\n\r\n/*Some data*/\r\nvar myData = [[\r\n[{\r\n \"group\": \"Aktuelles\",\r\n \"headline\": \"News1.1 hip hip hurra\",\r\n \"teaser\": \"Teaser for News...\",\r\n \"content\": \"Some more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...Some more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...Some more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...Some more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...Some more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...Some more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...Some more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ... LAST\",\r\n \"leftImage\": \"images/newsPlaceholder.png\",\r\n \"image\": \"images/newsPlaceholder.png\",\r\n \"type\": \"news\"\r\n},{\r\n \"group\": \"Aktuelles\",\r\n \"headline\": \"News1.2 bl bla\",\r\n \"teaser\": \"Teaser for News...\",\r\n \"content\": \"Some more text about ...\",\r\n \"leftImage\": \"images/newsPlaceholder.png\",\r\n \"image\": \"images/newsPlaceholder.png\",\r\n \"type\": \"news\"\r\n},{\r\n \"group\": \"Aktuelles\",\r\n \"headline\": \"News1.3\",\r\n \"teaser\": \"Teaser for News...\",\r\n \"content\": \"Some more text about ...\",\r\n \"leftImage\": \"images/newsPlaceholder.png\",\r\n \"image\": \"images/newsPlaceholder.png\",\r\n \"type\": \"news\"\r\n},{\r\n \"group\": \"Aktuelles\",\r\n \"headline\": \"News1.4\",\r\n \"teaser\": \"Teaser for News...\",\r\n \"content\": \"Some more text about ...\",\r\n \"leftImage\": \"images/newsPlaceholder.png\",\r\n \"image\": \"images/newsPlaceholder.png\",\r\n \"type\": \"news\"\r\n},\r\n{\r\n \"group\": \"Aktuelles\",\r\n \"headline\": \"News1.1 huhuhuhu\",\r\n \"teaser\": \"Teaser for News...\",\r\n \"content\": \"Some more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...Some more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...Some more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...Some more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...Some more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...Some more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...Some more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ...ome more text about ... LAST\",\r\n \"leftImage\": \"images/newsPlaceholder.png\",\r\n \"image\": \"images/newsPlaceholder.png\",\r\n \"type\": \"news\"\r\n},{\r\n \"group\": \"Aktuelles\",\r\n \"headline\": \"News1.2\",\r\n \"teaser\": \"Teaser for News...\",\r\n \"content\": \"Some more text about ...\",\r\n \"leftImage\": \"images/newsPlaceholder.png\",\r\n \"image\": \"images/newsPlaceholder.png\",\r\n \"type\": \"news\"\r\n},{\r\n \"group\": \"Aktuelles\",\r\n \"headline\": \"News1.3\",\r\n \"teaser\": \"Teaser for News...\",\r\n \"content\": \"Some more text about ...\",\r\n \"leftImage\": \"images/newsPlaceholder.png\",\r\n \"image\": \"images/newsPlaceholder.png\",\r\n \"type\": \"news\"\r\n},{\r\n \"group\": \"Aktuelles\",\r\n \"headline\": \"News1.4\",\r\n \"teaser\": \"Teaser for News...\",\r\n \"content\": \"Some more text about ...\",\r\n \"leftImage\": \"images/newsPlaceholder.png\",\r\n \"image\": \"images/newsPlaceholder.png\",\r\n \"type\": \"news\"\r\n}\r\n],\r\n[{\r\n \"group\": \"Fach\",\r\n \"headline\": \"News2.1\",\r\n \"teaser\": \"Teaser for News...\",\r\n \"content\": \"Some more text about ...\",\r\n \"leftImage\": \"images/newsPlaceholder.png\",\r\n \"image\": \"images/newsPlaceholder.png\",\r\n \"type\": \"news\"\r\n},{\r\n \"group\": \"Fach\",\r\n \"headline\": \"News2.2\",\r\n \"teaser\": \"Teaser for News...\",\r\n \"content\": \"Some more text about ...\",\r\n \"leftImage\": \"images/newsPlaceholder.png\",\r\n \"image\": \"images/newsPlaceholder.png\",\r\n \"type\": \"news\"\r\n},{\r\n \"group\": \"Fach\",\r\n \"headline\": \"News2.3\",\r\n \"teaser\": \"Teaser for News...\",\r\n \"content\": \"Some more text about ...\",\r\n \"leftImage\": \"images/newsPlaceholder.png\",\r\n \"image\": \"images/newsPlaceholder.png\",\r\n \"type\": \"news\"\r\n},{\r\n \"group\": \"Fach\",\r\n \"headline\": \"News2.4\",\r\n \"teaser\": \"Teaser for News...\",\r\n \"content\": \"Some more text about ...\",\r\n \"leftImage\": \"images/newsPlaceholder.png\",\r\n \"image\": \"images/newsPlaceholder.png\",\r\n \"type\": \"news\"\r\n},{\r\n \"group\": \"Fach\",\r\n \"headline\": \"News2.3\",\r\n \"teaser\": \"Teaser for News...\",\r\n \"content\": \"Some more text about ...\",\r\n \"leftImage\": \"images/newsPlaceholder.png\",\r\n \"image\": \"images/newsPlaceholder.png\",\r\n \"type\": \"news\"\r\n},{\r\n \"group\": \"Fach\",\r\n \"headline\": \"News2.4\",\r\n \"teaser\": \"Teaser for News...\",\r\n \"content\": \"Some more text about ...\",\r\n \"leftImage\": \"images/newsPlaceholder.png\",\r\n \"image\": \"images/newsPlaceholder.png\",\r\n \"type\": \"news\"\r\n}\r\n],[{\r\n \"group\": \"Sonstiges\",\r\n \"headline\": \"News3.1\",\r\n \"teaser\": \"Teaser for News...\",\r\n \"content\": \"Some more text about ...\",\r\n \"leftImage\": \"images/newsPlaceholder.png\",\r\n \"image\": \"images/newsPlaceholder.png\",\r\n \"type\": \"news\"\r\n},{\r\n \"group\": \"Sonstiges\",\r\n \"headline\": \"News3.2\",\r\n \"teaser\": \"Teaser for News...\",\r\n \"content\": \"Some more text about ...\",\r\n \"leftImage\": \"images/newsPlaceholder.png\",\r\n \"image\": \"images/newsPlaceholder.png\",\r\n \"type\": \"news\"\r\n},{\r\n \"group\": \"Sonstiges\",\r\n \"headline\": \"News3.3\",\r\n \"teaser\": \"Teaser for News...\",\r\n \"content\": \"Some more text about ...\",\r\n \"leftImage\": \"images/newsPlaceholder.png\",\r\n \"image\": \"images/newsPlaceholder.png\",\r\n \"type\": \"news\"\r\n},{\r\n \"group\": \"Sonstiges\",\r\n \"headline\": \"News3.4\",\r\n \"teaser\": \"Teaser for News...\",\r\n \"content\": \"Some more text about ...\",\r\n \"leftImage\": \"images/newsPlaceholder.png\",\r\n \"image\": \"images/newsPlaceholder.png\",\r\n \"type\": \"news\"\r\n}\r\n]\r\n]\r\n]\r\nyh = {};\r\nyh.ui = {};\r\n\r\nyh.ui.createOverviewData = function(_data){\r\n var tVdata = [];\r\n for(var group in _data){\r\n var tVG = Ti.UI.createTableViewSection({\r\n headerTitle: _data[group][0].group,\r\n _groupID: group\r\n })\r\n var _gData = _data[group].slice(0,4);\r\n\r\n if(_data[group].length > 4){\r\n var allEntries = Ti.UI.createTableViewRow({\r\n backgroundColor: '#fc0000',\r\n color: '#fff',\r\n className: \"allEntries\",\r\n hasDetail: true,\r\n title: \"Show all\"\r\n });\r\n tVG.add(allEntries);\r\n }\r\n\r\n var tRows = yh.ui.createOverviewRows(_gData,0);\r\n for(var r in tRows){\r\n tVG.add(tRows[r]);\r\n }\r\n tVdata.push(tVG);\r\n }\r\n\r\n return tVdata;\r\n };\r\n\r\n yh.ui.createOverviewRows = function(_data,_indexInt){\r\n var rows = [];\r\n for(var entry in _data){\r\n var tVR = Ti.UI.createTableViewRow({\r\n className: \"overviewRow\",\r\n hasChild: true,\r\n height: 55,\r\n _id: Number(_indexInt)+Number(entry),\r\n indentionLevel: 1,\r\n layout: 'vertical',\r\n leftImage: _data[entry].leftImage,\r\n dataType: _data[entry].type\r\n });\r\n\r\n var hl = Ti.UI.createLabel({\r\n font: {fontSize: 14, fontWeight: 'bold'},\r\n height: 15,\r\n left: 70,\r\n text: _data[entry].headline,\r\n top: 2\r\n });\r\n var ct = Ti.UI.createLabel({\r\n bottom: 0,\r\n font: {fontSize:12,fontWeight: 'normal'},\r\n height: 30,\r\n left: 70,\r\n text: _data[entry].teaser\r\n });\r\n// Ti.API.info(hl);\r\n tVR.add(hl);\r\n tVR.add(ct);\r\n rows.push(tVR);\r\n }\r\n return rows;\r\n }\r\n\r\n\r\nyh.ui.createOverviewList = function(_data){\r\n var tVdata = yh.ui.createOverviewData(_data);\r\n var tV = Ti.UI.createTableView({\r\n data: tVdata,\r\n editable: false,\r\n left: 0,\r\n style: Ti.UI.iPhone.TableViewStyle.GROUPED\r\n });\r\n\r\n tV.addEventListener('click',function(e){\r\n if(e.source.className == 'allEntries'){\r\n\r\n var nData = _data[e.section._groupID].slice(4);\r\n var r = yh.ui.createOverviewRows(nData);\r\n var p = e.index+(e.section.rowCount-1);\r\n var j = 0;\r\n for(var j in r){\r\n var index = Number(p)+Number(j);\r\n tV.insertRowAfter(index,r[j]);\r\n if(j == r.length-1){\r\n tV.deleteRow(e.index);\r\n }\r\n }\r\n }else{\r\n // Some other code to display a detail view.\r\n }\r\n })\r\n\r\n return tV;\r\n };\r\nfirst.add(yh.ui.createOverviewList(myData[0]));\r\nfirst.open();\r\n\r\n\r\n{code}\r\n\r\nh3. Associated HD Ticket:\r\nAPP-388641", "attachment": [ { "id": "23091", "filename": "Ipad 1 & 2.jpg", "author": { "name": "framirez", "key": "framirez", "displayName": "Francisco Antonio Duran Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-09-28T16:39:51.000+0000", "size": 1516949, "mimeType": "image/jpeg" }, { "id": "23090", "filename": "Ipod Touch.jpg", "author": { "name": "framirez", "key": "framirez", "displayName": "Francisco Antonio Duran Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-09-28T16:39:51.000+0000", "size": 1856504, "mimeType": "image/jpeg" }, { "id": "23089", "filename": "Simulator.png", "author": { "name": "framirez", "key": "framirez", "displayName": "Francisco Antonio Duran Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-09-28T16:39:51.000+0000", "size": 143393, "mimeType": "image/png" } ], "flagged": false, "summary": "IOS: insertRowAfter method is not working for tableViewSection in tableView ", "creator": { "name": "framirez", "key": "framirez", "displayName": "Francisco Antonio Duran Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "framirez", "key": "framirez", "displayName": "Francisco Antonio Duran Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium Studio, build: 1.0.4.201108101535, iOS SDK 4.3, Ipod touch Version 4.0, Ipad 1 and 2.", "comment": { "comments": [ { "id": "203034", "author": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "body": "Tested on the iOS simulator with 2.1GA, issue still reproducible. ", "updateAuthor": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "created": "2012-07-12T14:23:54.000+0000", "updated": "2012-07-12T14:23:54.000+0000" }, { "id": "203078", "author": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Subject line of this ticket is poorly written as it does not provide any meaningful information.", "updateAuthor": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-12T21:05:01.000+0000", "updated": "2012-07-12T21:05:01.000+0000" }, { "id": "420534", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I have been able to reproduce this issue with the following environment; \r\niPhone 7 (10.2) \r\nMacOS 10.11.6 (15G31) \r\nStudio 4.9.0.201705021158 \r\nTi SDK 6.1.0.v20170519131839 \r\nAppc NPM 4.2.9 \r\nAppc CLI 6.2.1 \r\nTi CLI 5.0.13 \r\nAlloy 1.9.11 \r\nArrow 2.0.0 \r\nXcode 8.2 (8C38) \r\nNode v4.8.2 \r\nJava 1.7.0_80", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-05-26T18:17:58.000+0000", "updated": "2017-05-26T18:17:58.000+0000" }, { "id": "447476", "author": { "name": "ahutton", "key": "ahutton", "displayName": "Alan Hutton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Was unable to reproduce the issue with :\r\nMacOS 10.14.4\t\r\nTi SDK 8.0.0 GA\r\nAppc CLI 7.0.10\r\nTi CLI 5.1.1\r\nXcode 10.2\r\nNode 8.11.3\r\nJava 10.0.2_13", "updateAuthor": { "name": "ahutton", "key": "ahutton", "displayName": "Alan Hutton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-04-04T18:04:07.000+0000", "updated": "2019-04-04T18:04:07.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }