{ "id": "124948", "key": "TIMOB-16225", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": "2014-01-17T17:59:26.000+0000", "priority": null, "labels": [ "alloy", "tss" ], "versions": [], "issuelinks": [ { "id": "34361", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "outwardIssue": { "id": "119379", "key": "ALOY-822", "fields": { "summary": "Add support for unsetting properties in TSS via 'undefined'", "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": "Medium", "id": "3" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": null, "updated": "2018-02-28T20:04:05.000+0000", "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" } }, "components": [ { "id": "12305", "name": "Core", "description": "Central component of the Platform (outside of Tooling, or platform specific implementation details)" } ], "description": "h1. moved to timob\r\n\r\nThe below ticket originally came in as an ALOY ticket, and is still referenced as ALOY-822. The developer wants the ability to unset properties on a Titanium UI proxy. While I will be addressing the fact that {{undefined}} can't be used in TSS, the rest of the scope of the ticket is outside that of ALOY and needs to be handled at the platform level. \r\n\r\n\r\n\r\nh1. Use case\r\n\r\nI would like to be able to *un*set properties via TSS (and XML).\r\n\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": "Support unsetting properties", "creator": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "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": [], "maxResults": 0, "total": 0, "startAt": 0 } } }