{ "id": "119379", "key": "ALOY-822", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "11113", "key": "ALOY", "name": "Alloy", "projectCategory": { "id": "10400", "description": "Tools for developing applications", "name": "Tooling" } }, "fixVersions": [ { "id": "15758", "description": "Alloy 1.4.0", "name": "Alloy 1.4.0", "archived": false, "released": true, "releaseDate": "2014-07-17" }, { "id": "15816", "description": "2014 Sprint 02", "name": "2014 Sprint 02", "archived": true, "released": true, "releaseDate": "2014-01-31" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-05-28T19:57:35.000+0000", "created": "2013-09-03T11:24:46.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "alloy", "qe-testadded", "tss" ], "versions": [], "issuelinks": [ { "id": "34361", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "inwardIssue": { "id": "124948", "key": "TIMOB-16225", "fields": { "summary": "Support unsetting properties", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } }, { "id": "37953", "type": { "id": "10122", "name": "Gantt: start-finish", "inward": "is triggered by", "outward": "is triggering" }, "outwardIssue": { "id": "129913", "key": "TISTUD-6403", "fields": { "summary": "Alloy: TSS undefined value should be accepted", "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": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-05-29T18:03:47.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": "13603", "name": "Styling", "description": "TSS, dynamic styling, styling API" } ], "description": "I would like to be able to *un*set properties via TSS (and XML).\r\n\r\nh1. Use case\r\nI want all windows to be heavyweight by default so my {{app.tss}} has:\r\n\r\n{code}\r\n\"Window\": {\r\n modal: false\r\n}\r\n{code}\r\n\r\nBut I have one widget which absolutely needs its window to be lightweight. Right now there is no way to do this. I can set {{modal}} to a different value like {{true}}, but even setting it to {{null}} won't make the window lightweight again.\r\n\r\nI tried setting {{modal}} to {{undefined}} but it throws a syntax error:\r\n\r\n{code}\r\nExpected \"Alloy\", \"L\", \"Ti\", \"Titanium\", \"WPATH\", \"[\", \"false\", \"null\", \"true\", \"{\", comment, end of line, number, string or whitespace but \"u\" found.\r\n{code}\r\n\r\nh1. Proposed solution\r\n\r\nMy suggestion is to accept {{undefined}} as a valid value, but instead of actually setting it, use it to trigger removing the property.\r\n\r\nThat way, for that specific window I can set {{modal}} to {{undefined}} which would remove that property from the dictionary passed to {{Ti.UI.createWindow}}.", "attachment": [], "flagged": false, "summary": "Add support for unsetting properties in TSS via 'undefined'", "creator": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "environment": "SDK/CLI 3.1.2.GA\r\nAlloy 1.2.1.GA", "comment": { "comments": [ { "id": "282183", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "When will this be discussed in triage?", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2013-12-03T19:38:22.000+0000", "updated": "2013-12-03T19:38:22.000+0000" }, { "id": "288631", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "For this ticket we will be making {{undefined}} usable in TSS, but the rest is outside the scope of ALOY. I created a similar ticket, TIMOB-16225, as \"unsetting\" properties needs to be handled at the platform level. Simple passing {{undefined}} to proxy properties actually has specific behavior in some cases, so Alloy can't just assume that it means it should remove it.", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-17T18:04:41.000+0000", "updated": "2014-01-17T18:04:41.000+0000" }, { "id": "288637", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Thx Tony, know about that ticket and see the difference.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2014-01-17T18:28:38.000+0000", "updated": "2014-01-17T18:28:38.000+0000" }, { "id": "289150", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/alloy/pull/305\r\ntest app: https://github.com/appcelerator/alloy/tree/master/test/apps/testing/ALOY-822\r\n\r\nFunctional test consists of simply making sure that the given test app will compile without error. Prior to this fix, it would abort with the error mentioned in the description of this ticket. Additionally you can confirm that the generated controller code creates a {{void 0}} entry where the {{undefined}} should be (as uglify-js minifies it).", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-21T23:12:53.000+0000", "updated": "2014-01-21T23:12:53.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }