{ "id": "115331", "key": "ALOY-701", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "11113", "key": "ALOY", "name": "Alloy", "projectCategory": { "id": "10400", "description": "Tools for developing applications", "name": "Tooling" } }, "fixVersions": [], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2013-06-12T14:08:52.000+0000", "created": "2013-06-01T18:15:50.000+0000", "priority": null, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-01-28T23:28:48.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": "Paste into index.xml\r\n\r\nRun a alloy compile. This is fail with relevant error strings.\r\n\r\n{code:xml}\r\n\r\n\t\r\n\t\t\r\n \t\t\r\n \t\t\r\n \t\t\r\n \t\t\r\n \t\t\t\r\n \t\r\n \t\r\n \t\t\r\n\t\r\n\r\n{code}\r\n\r\nThis sort of layout for a template won't compile. The nested labels in a view are in order to use a layout of vertical on DetailContainer. If there is a better way to deal with this then please tell me, but otherwise I think I have to guess heights for the labels.", "attachment": [], "flagged": false, "summary": "Alloy Listview templates don't support nesting", "creator": { "name": "ndastur", "key": "ndastur", "displayName": "Neville Dastur", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "SDK 3.1.0GA\r\nAlloy 1.2.0 from source", "comment": { "comments": [ { "id": "255622", "author": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hello Neville, \n\nWould you mind providing a full test case, one that we can reproduce the issue so as to easily see what is going on? You can either package it up or just paste the necessary code. Once I can reproduce I would be glad to pass along to the Alloy team. For future reference:\n\nhttps://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report\n\nThanks for your cooperation,\n\nCarter", "updateAuthor": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-03T21:58:07.000+0000", "updated": "2013-06-03T21:58:07.000+0000" }, { "id": "255631", "author": { "name": "ndastur", "key": "ndastur", "displayName": "Neville Dastur", "active": true, "timeZone": "Europe/London" }, "body": "Hi Carter\n\nI have updated the description.\n\nThanks", "updateAuthor": { "name": "ndastur", "key": "ndastur", "displayName": "Neville Dastur", "active": true, "timeZone": "Europe/London" }, "created": "2013-06-03T22:07:44.000+0000", "updated": "2013-06-03T22:07:44.000+0000" }, { "id": "255956", "author": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Neville,\n\nPasting this into an index.xml gives me the follow error:\n{code}\n[ERROR] : \b\b \b[ERROR] Compile failed. index.xml must have a top-level container element.\n[ERROR] : \b\b \b[ERROR] Valid elements: [Ti.UI.Window,Ti.UI.iPad.SplitWindow,Ti.UI.TabGroup,Alloy.Collection,Alloy.Model]\n[ERROR] : \b\b \bAlloy compiler failed\n{code}\n\nIs this the error you are speaking of? Would you mind elaborating if I am doing something wrong here, I have followed your instructions to the best of my knowledge.\n\nBest,\nCarter\n", "updateAuthor": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-04T21:26:51.000+0000", "updated": "2013-06-04T21:26:51.000+0000" }, { "id": "255964", "author": { "name": "ndastur", "key": "ndastur", "displayName": "Neville Dastur", "active": true, "timeZone": "Europe/London" }, "body": "Hi Carter,\n\nSorry, no I had copied from a non index.xml file. For index.xml it will have to be a window rather than just a view. So no this is not the error.", "updateAuthor": { "name": "ndastur", "key": "ndastur", "displayName": "Neville Dastur", "active": true, "timeZone": "Europe/London" }, "created": "2013-06-04T21:41:57.000+0000", "updated": "2013-06-04T21:41:57.000+0000" }, { "id": "255966", "author": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Still no luck, would you mind providing the entire project, or at least the necessary files to run this, eg index.js, or any other controllers. \n\nThanks,\nCarter ", "updateAuthor": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-04T21:52:31.000+0000", "updated": "2013-06-04T21:52:31.000+0000" }, { "id": "255975", "author": { "name": "ndastur", "key": "ndastur", "displayName": "Neville Dastur", "active": true, "timeZone": "Europe/London" }, "body": "Okay, so I have put the code in https://github.com/ClinicalSoftwareSolutions/DemoBug/tree/alloy_nested_listview branch\n\nRun alloy compile --config platform=ios and the compile will fail with:\n\n{code}\n[INFO] ----- MVC GENERATION -----\n[INFO] [index.xml] view processing...\n[INFO] style: \"index.tss\"\n[INFO] view: \"index.xml\"\n[INFO] controller: \"index.js\"\nWARN: ERROR: Unexpected token name «__alloyId6», expected punc «:» [Resources/alloy/controllers/index.js:27,241]\n[TRACE] var Alloy = require('alloy'),\n\tBackbone = Alloy.Backbone,\n\t_ = Alloy._;\n\n\n\nfunction Controller() {\n\n\trequire('alloy/controllers/' + \"BaseController\").apply(this, Array.prototype.slice.call(arguments));\n\n\tvar __parentSymbol = arguments[0] ? arguments[0]['__parentSymbol'] : null;\n\tvar $model = arguments[0] ? arguments[0]['$model'] : null;\n\tvar __itemTemplate = arguments[0] ? arguments[0]['__itemTemplate'] : null;\n\tvar $ = this;\n\tvar exports = {};\n\tvar __defers = {};\n\n\t// Generated code that must be executed before all UI and/or\n\t// controller code. One example is all model and collection\n\t// declarations from markup.\n\n\n\t// Generated UI code\n\t$.__views.index = Ti.UI.createWindow(\n{backgroundColor:\"white\",id:\"index\",}\n);\n$.__views.index && $.addTopLevelView($.__views.index);var __alloyId1={};var __alloyId3=[];var __alloyId4={type:'Ti.UI.ImageView',bindId:'image',properties:{bindId:\"image\",},};__alloyId3.push(__alloyId4);var __alloyId5={type:'Ti.UI.View',var __alloyId6=[];var __alloyId7={type:'Ti.UI.Label',bindId:'name',properties:{width:Ti.UI.SIZE,height:Ti.UI.SIZE,color:\"#000\",bindId:\"name\",},};__alloyId6.push(__alloyId7);var __alloyId8={type:'Ti.UI.Label',bindId:'type',properties:{width:Ti.UI.SIZE,height:Ti.UI.SIZE,color:\"#000\",bindId:\"type\",},};__alloyId6.push(__alloyId8);properties:{},childTemplates:__alloyId6,};__alloyId3.push(__alloyId5);var __alloyId2 = {properties:{name:\"lvItem\",},childTemplates:__alloyId3,};__alloyId1[\"lvItem\"]=__alloyId2;$.__views.list = Ti.UI.createListView(\n{templates:__alloyId1,id:\"list\",defaultItemTemplate:\"lvItem\",}\n);\n$.__views.index.add($.__views.list);\nexports.destroy=function(){};\n\n\t// make all IDed elements in $.__views available right on the $ in a\n\t// controller's internal code. Externally the IDed elements will\n\t// be accessed with getView().\n\t_.extend($, $.__views);\n\n\t// Controller code directly from the developer's controller file\nfunction doClick(e) {\n alert($.label.text);\n}\n\n$.index.open();\n\n\n\t// Generated code that must be executed after all UI and\n\t// controller code. One example deferred event handlers whose\n\t// functions are not defined until after the controller code\n\t// is executed.\n\n\n\t// Extend the $ instance with all functions and properties\n\t// defined on the exports object.\n\t_.extend($, exports);\n}\n\nmodule.exports = Controller;\n\n\n/opt/local/lib/node_modules/alloy/Alloy/commands/compile/sourceMapper.js:99\n\t\tthrow e;\n\t\t ^\nError\n at new JS_Parse_Error (/opt/local/lib/node_modules/alloy/node_modules/uglify-js/lib/parse.js:185:18)\n at js_error (/opt/local/lib/node_modules/alloy/node_modules/uglify-js/lib/parse.js:199:11)\n at croak (/opt/local/lib/node_modules/alloy/node_modules/uglify-js/lib/parse.js:630:9)\n at token_error (/opt/local/lib/node_modules/alloy/node_modules/uglify-js/lib/parse.js:638:9)\n at expect_token (/opt/local/lib/node_modules/alloy/node_modules/uglify-js/lib/parse.js:651:9)\n at expect (/opt/local/lib/node_modules/alloy/node_modules/uglify-js/lib/parse.js:654:36)\n at /opt/local/lib/node_modules/alloy/node_modules/uglify-js/lib/parse.js:1181:13\n at /opt/local/lib/node_modules/alloy/node_modules/uglify-js/lib/parse.js:677:24\n at expr_atom (/opt/local/lib/node_modules/alloy/node_modules/uglify-js/lib/parse.js:1111:35)\n at maybe_unary (/opt/local/lib/node_modules/alloy/node_modules/uglify-js/lib/parse.js:1281:19)\n{code}", "updateAuthor": { "name": "ndastur", "key": "ndastur", "displayName": "Neville Dastur", "active": true, "timeZone": "Europe/London" }, "created": "2013-06-04T22:05:21.000+0000", "updated": "2013-06-04T22:05:21.000+0000" }, { "id": "257170", "author": { "name": "ndastur", "key": "ndastur", "displayName": "Neville Dastur", "active": true, "timeZone": "Europe/London" }, "body": "Hi Carter. Do you now see the error using the project in GitHub?", "updateAuthor": { "name": "ndastur", "key": "ndastur", "displayName": "Neville Dastur", "active": true, "timeZone": "Europe/London" }, "created": "2013-06-11T16:39:18.000+0000", "updated": "2013-06-11T16:39:18.000+0000" }, { "id": "257214", "author": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hello Neville,\n \nYes, sorry about the wait, I had forgotten to update my node.js and was getting funny errors. Now we are on the same page but after messing around with your code, I do not think the nested labels are the issue here. If you remove one of them, the code still breaks, with the same error. Is the same thing happening for you?\n\nRegards,\nCarter", "updateAuthor": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-11T18:52:00.000+0000", "updated": "2013-06-11T18:52:00.000+0000" }, { "id": "257219", "author": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Neville,\n\nI think I understand what you are getting at, the double nesting within an itemTemplate is causing the error, not the fact that there are two labels within the view within the ItemTemplate. I will pass along to the Alloy team to see if they have any insight on this.\n\nRegards,\nCarter", "updateAuthor": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-11T19:12:50.000+0000", "updated": "2013-06-11T19:12:50.000+0000" }, { "id": "257257", "author": { "name": "ndastur", "key": "ndastur", "displayName": "Neville Dastur", "active": true, "timeZone": "Europe/London" }, "body": "Carter, yes that is right. I use the label inside of a view so that they can be vertically layouted.\r\n\r\nAlso, I notice that you are changing the reporter on all these issues away from my name. Is there a reason. It's just that is makes it awkward for me to filter and search for issues I have reported and are interested in the progress of. No one else seems to do that.", "updateAuthor": { "name": "ndastur", "key": "ndastur", "displayName": "Neville Dastur", "active": true, "timeZone": "Europe/London" }, "created": "2013-06-11T21:59:16.000+0000", "updated": "2013-06-11T21:59:16.000+0000" }, { "id": "257312", "author": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "body": "By default, when moving a ticket to Alloy, the reporter switches to the person who moved it.\n\nAnd as for changing the reporter to myself on other tickets, I have spoken to my colleagues who have informed me that that way of reporting bugs is now not needed, I hadn't realized this. It used to be automatic (just how it is for alloy tickets now), that whoever moved the ticket to Ti-Mobile or Ti-Studio would become the reporter, and to keep everything consistent, this standard was continued for quite some time via manual changes for other bug types. I'll ensure from now on that you remain as the reporter and I will put a bug report through to remove the automatic assignment in Alloy tickets.\n\nThanks for bringing that to my attention,\nCarter", "updateAuthor": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-11T23:43:18.000+0000", "updated": "2013-06-11T23:43:18.000+0000" }, { "id": "257365", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Duplicate of ALOY-678", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-12T14:08:53.000+0000", "updated": "2013-06-12T14:08:53.000+0000" } ], "maxResults": 12, "total": 12, "startAt": 0 } } }