{ "id": "116843", "key": "TIMOB-14480", "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": "2013-07-03T15:02:35.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "add", "event", "eventlistener", "events", "remove", "view", "views" ], "versions": [], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:03:59.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": "I would like to have a {{remove}} event fired when a view is removed from a parent, with the parent in {{e.parent}} or {{e.source}}.\r\n\r\nThis is particular useful if the removed view is provided by another controller and that controllers needs to cleanup.\r\n\r\nOf course you could work around this by manually notifying the other controller that its view has been removed, but if it's a list of views you will need to keep references to all their providing controllers as well.\r\n\r\nJust for the sake of feature symmetry... we could add {{add}} as well, allowing the providing controller to keep track of who's using it's view, possibly resetting state when removed and then added again. Or even taking a property of the parent (e.g. Window title) and use it on the view (re-display title there).", "attachment": [], "flagged": false, "summary": "TiAPI: Fire 'remove' event when a view is removed from it's parent", "creator": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "Any", "comment": { "comments": [ { "id": "260747", "author": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "body": "This could get complicated with Ti.UI.ScrollableView children. Also, TableView/ListView rows.", "updateAuthor": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "created": "2013-07-03T15:06:01.000+0000", "updated": "2013-07-03T15:06:01.000+0000" }, { "id": "260769", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Will that stop you? ;)\n\nAnother thing might be what to if the parent gets removed from its own parent. It should go down the tree and fire the event I guess?", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2013-07-03T17:12:49.000+0000", "updated": "2013-07-03T17:12:49.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }