{ "id": "117999", "key": "AC-1993", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2013-08-05T21:40:51.000+0000", "created": "2013-08-05T19:45:01.000+0000", "labels": [ "appendrow", "tableviewrow", "tableviewsection" ], "versions": [], "issuelinks": [ { "id": "30636", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "91754", "key": "TIDOC-622", "fields": { "summary": "APIDoc: TableViewSection example is wrong", "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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "updated": "2016-06-21T11:12:09.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": [], "description": "AppendRow/InsertRow... to a TableViewSection absolutely doesn't work! Tested it anyone before publication in the Ti Docs?\r\n\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor: \"white\"\r\n});\r\n\r\nvar table = Ti.UI.createTableView({\r\n\twidth: Ti.UI.FILL, height: Ti.UI.FILL,\r\n\tstyle: Ti.UI.iPhone.TableViewStyle.GROUPED\r\n});\r\n\r\nvar section_1 = Ti.UI.createTableViewSection();\r\nvar section_2 = Ti.UI.createTableViewSection();\r\n\r\nsection_1.add(Ti.UI.createTableViewRow({title: \"ROW_1\"}));\r\nsection_1.add(Ti.UI.createTableViewRow({title: \"ROW_2\"}));\r\nsection_1.add(Ti.UI.createTableViewRow({title: \"ROW_3\"}));\r\n\r\nvar addNextRow = Ti.UI.createTableViewRow({title: \"Add next row\"});\r\n\r\naddNextRow.addEventListener(\"click\", function(){\r\n\tsection_2.appendRow(Ti.UI.createTableViewRow({title: \"Added row...\"}));\r\n});\r\n\r\nsection_2.add(addNextRow);\r\n\r\n\r\ntable.data = [section_1, section_2];\r\n\r\n\r\nwin.add(table);\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: appendRow to a TableViewSection doesn't work", "creator": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Macbook Pro, OSX 10.7.5, iOS Simulator v. 6.0 (369.2). Ti: 3.1.1 GA", "comment": { "comments": [ { "id": "264996", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "As explained in TIDOC-622, you must use setData to create a new section layout.\r\n\r\nWorkaround here: https://gist.github.com/iskugor/2775243\r\n\r\nThe appendRow method is available for the TableView class, not the TableViewSection class. See: http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.TableView-method-appendRow", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-05T21:40:51.000+0000", "updated": "2013-08-05T21:40:51.000+0000" }, { "id": "264999", "author": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Next workaround...nice\r\n\r\nhttps://gist.github.com/iskugor/2775243 -> This is about how to appendSection to a tableView not how to appendRow to a section.\r\n\r\nWhy is in the Ti Docs this:\r\n??Before the table is rendered, the TableViewSection add method may be used to add TableViewRow objects to a section. After it is rendered, one of the TableView insertRowBefore, insertRowAfter, or appendRow methods must be used instead.??\r\n\r\n-> How to appendRow to a section using functions above...?\r\n", "updateAuthor": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-05T21:54:52.000+0000", "updated": "2013-08-05T21:57:22.000+0000" }, { "id": "388735", "author": { "name": "a.marcone", "key": "a.marcone", "displayName": "Alberto Marcone", "active": true, "timeZone": "Europe/Berlin" }, "body": "yep, I agree with the above comment", "updateAuthor": { "name": "a.marcone", "key": "a.marcone", "displayName": "Alberto Marcone", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-06-21T11:12:09.000+0000", "updated": "2016-06-21T11:12:09.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }