{ "id": "88509", "key": "TIMOB-8295", "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": null, "resolutiondate": null, "created": "2012-03-22T13:16:03.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "core" ], "versions": [ { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" } ], "issuelinks": [ { "id": "16888", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "90689", "key": "TIMOB-8853", "fields": { "summary": "iOS: KitchenSink - Screenshot appears in partial size, as a result of running \"Screenshot\" test case in landscape mode ", "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": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": null, "updated": "2018-03-06T18:57:55.000+0000", "status": { "description": "This issue was once resolved, but the resolution was deemed incorrect. From here issues are either marked assigned or resolved.", "name": "Reopened", "id": "4", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "The following example creates a table with 3 rows and 3 columns then\r\n 1. Copies the 2nd row and pastes it as the 4th row\r\n 2. Displays the table\r\n 3. Copies the 3nd row and pastes it as the 5th row\r\n\r\nThe 4th and 5th rows are not proper size. The do not contain all of the cells from the rows!\r\n\r\nIt is also important to notice that width of the image returned by toImage() is 100 which is incorrect. The same incorrect value is returned both before and after displaying the table.\r\n\r\nPlease note that the following code is run from a window and not app.js. When this code is in app.js the 5th row is blank, but to be honest, I am not concerned about that!\r\n\r\n{code:title=app.js|borderStyle=solid}\r\nvar win1 = Ti.UI.createWindow({url:'TheWindow.js'});\r\nwin1.open();\r\n{code} \r\n\r\n{code:title=TheWindow.js|borderStyle=solid}\r\nvar win1 = Ti.UI.currentWindow;\r\n\r\n// Array of rows\r\nvar Rows = [];\r\n\r\nvar TheLabel;\r\nvar TheRow;\r\nvar TheCol;\r\n\r\n// Create the table with 3 rows\r\nfor (var Y=1; Y<=3; Y++) // Row loop\r\n{\r\n TheRow=Ti.UI.createView({top:((Y-1)*21), \r\n height:21,\r\n backgroundColor:'gray'});\r\n for (var X=1; X<=4; X++) // Column loop\r\n {\r\n // Create the cells\r\n TheCol=Ti.UI.createView({left:((X-1)*50), \r\n width:50});\r\n TheLabel=Ti.UI.createLabel({text:Y + '.' + X});\r\n TheCol.add(TheLabel);\r\n TheRow.add(TheCol);\r\n }\r\n Rows.push(TheRow) \r\n}\r\n\r\n// create the 4th row\r\nvar TheRealRow = Ti.UI.createView({top:((4-1)*21), \r\n height:21});\r\nTheCol = Ti.UI.createView({left:0, \r\n width:150}); // Force the correct width\r\nTheRealRow.add(TheCol);\r\n\r\n// Copy the image of the 2nd row\r\nvar TheRowImage = Rows[1].toImage();\r\n\r\n// Check the size of the image, it should be 150 bit it is 100!\r\nTi.API.info('*** Before displayed TheRowImage.width =' + TheRowImage.width); \r\n\r\n// paste the image of the 2nd row in the 4th row \r\nTheCol.add(Ti.UI.createImageView({image:TheRowImage,\r\n height:21,\r\n width:TheRowImage.width}));\r\n\r\n// Display the first three rows\r\nfor (var Z=0; Z