{ "id": "108459", "key": "ALOY-485", "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": [ { "id": "15403", "description": "Alloy 1.3.0", "name": "Alloy 1.3.0", "archived": false, "released": true, "releaseDate": "2013-12-20" }, { "id": "15753", "description": "2013 Sprint 22", "name": "2013 Sprint 22", "archived": true, "released": true, "releaseDate": "2013-11-01" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-10-24T19:28:00.000+0000", "created": "2013-01-23T22:19:54.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "ios" ], "versions": [ { "id": "14634", "description": "Alloy 1.0.0", "name": "Alloy 1.0.0", "archived": false, "released": true, "releaseDate": "2013-02-19" } ], "issuelinks": [ { "id": "25045", "type": { "id": "10020", "name": "Depends", "inward": "is dependent of", "outward": "depends on" }, "outwardIssue": { "id": "108454", "key": "TIMOB-12399", "fields": { "summary": "iOS: No reliable way to remove all children from a proxy, and know when they are gone", "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 } } } }, { "id": "25044", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "108400", "key": "ALOY-482", "fields": { "summary": "View-based collection binding not properly clearing children before repopulating", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "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 } } } }, { "id": "25046", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "105688", "key": "ALOY-402", "fields": { "summary": "Account for all 1.0.0 deprecations and API changes", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } } ], "assignee": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-12-10T00:03:12.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": "12329", "name": "Runtime", "description": "Generic bucket for uncategorized runtime issues" } ], "description": "h2. problem\r\n\r\nThis issue is covered in detail in the related and dependent linked tickets. In brief, iOS remove() calls (used in collection binding for views) are performed asynchronously. If you are doing a \"remove all\" in a loop, this unfortunately means that operations that are performed after those remove() calls may actually be performed before the remove() is complete. This will cause some weird behavior if you are attempting to add views to the view hierarchy directly after the \"remove all\", which collection binding for views does.\r\n\r\nh2. impact\r\n\r\nAny Titanium views that use the typical add()/remove() functions to establish parent/child relationships in the UI will behave unreliably on iOS until TIMOB-12399 is resolved. For the sake of clarity, here is a brief listing of views that would and would not work. The list is not comprehensive, but a few examples should make it more readily apparent exactly what this issue impacts:\r\n\r\n* Will work\r\n** Ti.UI.ScrollableView, as it uses *views* to establish its view hierarchy\r\n** Ti.UI.TableView, as it uses *data* to establish its rows\r\n** Ti.UI.ListView (in Alloy 1.2.0) as it uses *sections* to establish its sections\r\n** Other UI components with special APIs for managing views (Buttonbar, TabbedBar)\r\n* Will not work (as it uses add()/remove())\r\n** Ti.UI.View\r\n** Ti.UI.ScrollView\r\n** Ti.UI.Window\r\n** Essentially any UI component that does not have a special API for managing views contained within it\r\n\r\nh2. notes\r\n\r\nEven after this ticket is resolved, TiSDK 3.2.0 or greater will be required for this to work in Alloy.", "attachment": [], "flagged": false, "summary": "Collection binding on views for iOS incorrectly repopulating UI", "creator": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "263561", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "As a (manual) workaround I populate a new \"wrapper\" {{Ti.UI.View}}, remove the previous wapper and then add the new one to the {{Ti.UI.View}} I need to populate.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2013-07-27T19:19:53.000+0000", "updated": "2013-07-27T19:19:53.000+0000" }, { "id": "276662", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Resolved as a result TIMOB-12399. TiSDK should be pulled from master, must be at least as recent as this commit: https://github.com/appcelerator/titanium_mobile/commit/affad6c1b077db76c795a91f861fa0a45c7c6af6\r\n\r\ntest app: https://github.com/appcelerator/alloy/tree/master/test/apps/models/journal\r\n\r\n\r\nFunctional testing should be performed on an iOS sim/device.\r\n\r\n# Run the app on iOS\r\n# Repeatedly add entries to the journal. Make sure to do around 10 to be sure.\r\n# Ensure that each time a journal entry is added that they are sorted in the right order, with the most recent journal entry at the top, the oldest at the bottom. Before the above version of the TiSDK, the order of the journal entries was not guaranteed and was often out of order.\r\n", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-24T19:28:00.000+0000", "updated": "2013-10-24T19:28:00.000+0000" }, { "id": "283337", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed.\n\nTiSDK 3.2.0.v20131209000852\nCLI 3.2.0-beta\nAlloy 1.3.0-beta\nTitanium Studio 3.2.0.201312081251\n\niOS simulator\niPad Mini iOS 7\niPad Mini iOS 6\nNexus Galaxy 4.3\n\nClosing", "updateAuthor": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-10T00:03:04.000+0000", "updated": "2013-12-10T00:03:04.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }