{ "id": "94041", "key": "AC-3035", "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": "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": "2013-04-02T18:28:47.000+0000", "created": "2012-06-28T07:40:46.000+0000", "labels": [ "scrollableview", "tableview" ], "versions": [], "issuelinks": [], "assignee": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "updated": "2016-03-08T07:48:04.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": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "*Problem description*\r\nIf I put a tableview with custom tabelviewsection in a scrollableview, when I click on row and use addView method of scrollableView the application crashes.\r\n\r\n*Code snippet*\r\n{code}\r\n(function() {\r\n //create component instance\r\n var self = Ti.UI.createWindow({\r\n backgroundColor:'#ffffff',\r\n navBarHidden:true,\r\n exitOnClose:true\r\n });\r\n \r\n\r\n var tableView = Ti.UI.createTableView(); \r\n \r\n var oneSection = Ti.UI.createTableViewSection({\r\n headerView: Ti.UI.createView({\r\n height: '25dp',\r\n backgroundColor: '#F00'\r\n })\r\n });\r\n \r\n for (var i=0; i < 20; i++) {\r\n oneSection.add(Ti.UI.createTableViewRow({\r\n title: 'coucou' + i,\r\n height: '40dp'\r\n })) \r\n }; \r\n tableView.setData([oneSection]);\r\n \r\n var scrollView = Ti.UI.createScrollableView({\r\n views: [tableView]\r\n });\r\n self.add(scrollView);\r\n\r\n \r\n var secondView = Ti.UI.createView({\r\n backgroundColor: '#F00'\r\n });\r\n \r\n \r\n tableView.addEventListener('click', function(item) {\r\n \r\n // crash HERE !!!!!!\r\n\r\n scrollView.addView(secondView); \r\n scrollView.moveNext();\r\n \r\n \r\n });\r\n\t\r\n self.open();\r\n})();\r\n{code}", "attachment": [ { "id": "29054", "filename": "app.js", "author": { "name": "seb_logica", "key": "seb_logica", "displayName": "Sebastien", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-05T06:20:55.000+0000", "size": 987, "mimeType": "application/x-javascript" } ], "flagged": false, "summary": "Android: Custom TableViewSection in ScrollableView crash", "creator": { "name": "seb_logica", "key": "seb_logica", "displayName": "Sebastien", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "seb_logica", "key": "seb_logica", "displayName": "Sebastien", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Mac OSX, Titanium SDK 2.0.2.GA, Android 2.3", "comment": { "comments": [ { "id": "201371", "author": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Not reproducible with the example source code.\r\nProper app.js would be helpful.", "updateAuthor": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-03T12:04:15.000+0000", "updated": "2012-07-03T12:04:15.000+0000" }, { "id": "201547", "author": { "name": "seb_logica", "key": "seb_logica", "displayName": "Sebastien", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I fixed the code and attached \"app.js\" file.\r\n\r\nI hope you could reproduce now .\r\nthank you", "updateAuthor": { "name": "seb_logica", "key": "seb_logica", "displayName": "Sebastien", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-05T06:22:26.000+0000", "updated": "2012-07-05T06:22:26.000+0000" }, { "id": "208084", "author": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi,\r\n\r\nYou need to remove the views inside scrollable view before adding a new view. Use 'scrollView.removeView(tableView)' before you add secondView inside table click. this will fix the issue.\r\n\r\nRegards,\r\nAnirudh", "updateAuthor": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-17T10:16:57.000+0000", "updated": "2012-07-17T10:16:57.000+0000" }, { "id": "208253", "author": { "name": "seb_logica", "key": "seb_logica", "displayName": "Sebastien", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi,\r\n\r\nThank you for your answer. When I remove the previous view, it works but I lose transition effect and the possibility to use movePrevious to back on the first view.\r\n\r\nI think the issue comes from tableview in processProperties method. This method already have a problem with searchbar because it add the same instance without remove previous parent. And for custom section, I think it's the same king of issue.\r\n\r\nRegards,\r\nSeb", "updateAuthor": { "name": "seb_logica", "key": "seb_logica", "displayName": "Sebastien", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-18T01:32:22.000+0000", "updated": "2012-07-18T01:32:22.000+0000" }, { "id": "245221", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Cannot reproduce with Ti SDK 3.0.2 GA with Samsung Galaxy S2 Android 2.3.6. Tapping any of the rows opens the view without crashing.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-02T18:28:47.000+0000", "updated": "2013-04-02T18:28:47.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }