{ "id": "61148", "key": "TIMOB-516", "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": "11258", "description": "Holding Pen for Triaged Issues", "name": "Backlog", "archived": false, "released": false } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:53:21.000+0000", "created": "2011-04-15T02:30:44.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "defect", "ios", "iphone", "tableview" ], "versions": [], "issuelinks": [], "assignee": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:53:21.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": "{html}

from community - rows get cut off/jacked up
\nsee ticket:
\nhttp://helpdesk.appcelerator.net/tickets/1398

\n

code:

\n

var win = Titanium.UI.createWindow();
\nwin.setBackgroundColor('#EAF6C4');
\nvar e = Titanium.UI.createButton({

\n
\nstyle:Titanium.UI.iPhone.SystemButtonStyle.BORDERED,\nsystemButton:Titanium.UI.iPhone.SystemButton.REFRESH\n
\n

}); win.setRightNavButton(e);
\n// var URL = \"http://localhost/~neps/test.json\";\n// var URL = \"http://gothamist.com/js/staticRecentEntries.json\";\nvar URL = \"http://twitter.com/status/user_timeline/sxswist.json?count=30\";

\n
\nfunction fetchRows()\n{\nvar data = [];\nvar xhr = Titanium.Network.createHTTPClient();\nxhr.onload = function()\n{\n    // convert the response JSON text into a JavaScript object\n    var entry = eval('(' + this.responseText + ')');\n\n    for (var i=0;i<entry.length;i++)\n    {\n        var row = Ti.UI.createTableViewRow();\n        row.height  ='auto';\n        row.hasChild = true;\n        row.className = 'normal'\n\n        var comment = Ti.UI.createLabel({\n        color:'#222',\n        font:{fontSize:16,fontWeight:'normal', fontFamily:'Helvetica'},\n        left:10,\n        right:10,\n        top:10,\n        bottom:10,\n        height:'auto',\n        width:'auto', \n        text:entry[i].text\n        });\n        comment.rowNum = i;\n        row.add(comment);\n\n        var url = 'http://twitter.com/sxswist/status/' + entry[i].id;\n        row.url = url; \n\n        data.push(row);\n    }\n    // hide loader\n    toolActInd.hide();\n    win.setToolbar(null,{animated:true});\n\n    // since this is the first page, just set the data since we started out empty\n    tableView.setData(data);\n}\nxhr.open(\"GET\",URL);\nxhr.send(null);\n};\n\nvar tableView = Titanium.UI.createTableView();\n\nvar toolActInd = Titanium.UI.createActivityIndicator();\ntoolActInd.style = Titanium.UI.iPhone.ActivityIndicatorStyle.PLAIN;\ntoolActInd.font = {fontFamily:'Helvetica Neue', fontSize:15,fontWeight:'bold'};\ntoolActInd.color = 'white';\ntoolActInd.message = 'Loading...';\n//loader start\nwin.setToolbar([toolActInd],{animated:true});\ntoolActInd.show();\n//loader end\n\ntableView.addEventListener('click', function(e)\n{\n\n    var rowdata = e.row;\n    var w = Ti.UI.createWindow({title:'@sxswist',barColor:'#A2CF18'});\n    var webview = Ti.UI.createWebView();\n    webview.url = rowdata.url;\n    webview.addEventListener('load',function(e)\n    {\n        Ti.API.debug(\"webview loaded: \"+e.url);\n    });\n    w.add(webview);\n    win.tab.open(w);\n});\n\nwin.add(tableView); \nfetchRows();\n\ne.addEventListener('click', function()\n{\n    //loader start\n    win.setToolbar([toolActInd],{animated:true});\n    toolActInd.show();\n    //loader end\n    tableView.setData([]);\n    setTimeout(function()\n    {\n        fetchRows();\n    },1000)\n});\n
\n

win.open();

{html}", "attachment": [ { "id": "17861", "filename": "516.tiff", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:30:44.000+0000", "size": 265796, "mimeType": "image/tiff" }, { "id": "17862", "filename": "screen-shot-2010-08-26-at-113413-am.png", "author": { "name": "russfrank", "key": "russfrank", "displayName": "Russ Frank", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:30:45.000+0000", "size": 161372, "mimeType": "image/png" } ], "flagged": false, "summary": "table view does not render properly ", "creator": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "123436", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

valid, needs test case.

\n

The issue is seen when scrolling the list, then revealing the\npreviously scrolled objects. Occurs on simulator and device.

{html}", "updateAuthor": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:30:46.000+0000", "updated": "2011-04-15T02:30:46.000+0000" }, { "id": "123437", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

added screenshot

{html}", "updateAuthor": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:30:46.000+0000", "updated": "2011-04-15T02:30:46.000+0000" }, { "id": "123438", "author": { "name": "stevenlu", "key": "stevenlu", "displayName": "Steven Lu", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

What's the status of this ticket? This bug is a very big\neyesore.

{html}", "updateAuthor": { "name": "stevenlu", "key": "stevenlu", "displayName": "Steven Lu", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:30:46.000+0000", "updated": "2011-04-15T02:30:46.000+0000" }, { "id": "123439", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

This ticket is still marked 'new' and is not marked as a\npriority bug for 1.5.0 currently. There has been no work done on it\nbut we will fix it before release if there's time.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:30:47.000+0000", "updated": "2011-04-15T02:30:47.000+0000" }, { "id": "123440", "author": { "name": "stevenlu", "key": "stevenlu", "displayName": "Steven Lu", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

I still feel like this ticket should be at higher priority due\nto the number of watchers listed at the side. I noticed in 1.4.0rc1\nthat it was fixed momentarily, then after the 1.4.0 official push\nupdate, the bug came right back to haunt us.

{html}", "updateAuthor": { "name": "stevenlu", "key": "stevenlu", "displayName": "Steven Lu", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:30:47.000+0000", "updated": "2011-04-15T02:30:47.000+0000" }, { "id": "123441", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Do you have any additional information about where this was\nfixed, and then broken again? There was a very wide gap between rc1\nand the 1.4.0 drop.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:30:47.000+0000", "updated": "2011-04-15T02:30:47.000+0000" }, { "id": "123442", "author": { "name": "russfrank", "key": "russfrank", "displayName": "Russ Frank", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Here's a test case:

\n

var win = Titanium.UI.currentWindow; var table =\nTi.UI.createTableView(); data = []; for (var i=0; i < 40; i++)\n{

\n
\n  var row = Ti.UI.createTableViewRow({layout:'vertical', height: 'auto'});\n  var t = \"\"; \n  for (var j=0; j < i; j++) t += \"test \";\n  row.add (Ti.UI.createLabel({ height: 'auto', width: 'auto', text: t }));\n  row.add (Ti.UI.createLabel({ height: 'auto', width: 'auto', text: t }));\n  data.push(row);\n
\n

}
\ntable.setData(data); win.add(table);

\n

It appears that the bug will present when there are many\nvertical layout rows with height set to auto, each with multiple\nlabels added to them with their heights set to auto, and when each\nrow has a different height. Scrolling all the way to the bottom and\nback to the top with my test code above will reproduce the bug. See\nthe attached screenshot of my simulator.

{html}", "updateAuthor": { "name": "russfrank", "key": "russfrank", "displayName": "Russ Frank", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:30:48.000+0000", "updated": "2011-04-15T02:30:48.000+0000" }, { "id": "123443", "author": { "name": "jessedomack", "key": "jessedomack", "displayName": "Jesse Domack", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

This issue also pops up when you create a single label over 5\nlines and attach it to a tableViewRow with AutoHeight. The label at\nfirst is terminated with '...' then when scrolled off the page and\nback, the rest of the text shows up but is drawn outside the\ntableview row.

{html}", "updateAuthor": { "name": "jessedomack", "key": "jessedomack", "displayName": "Jesse Domack", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:30:48.000+0000", "updated": "2011-04-15T02:30:48.000+0000" }, { "id": "123444", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Fixed as part of tableview/view refactoring, duplicate of... a\nbillion other bugs.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:30:49.000+0000", "updated": "2011-04-15T02:30:49.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }