{ "id": "60703", "key": "TIMOB-71", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "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": [ { "id": "11210", "name": "Release 0.6.0", "archived": true, "released": true, "releaseDate": "2009-08-12" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:51:53.000+0000", "created": "2011-04-15T02:23:20.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android" ], "versions": [], "issuelinks": [], "assignee": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:51:53.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "{html}

Here are commits \nhttp://github.com/appcelerator/titanium_mobile/commit/00022a41e290a...
\n\nhttp://github.com/appcelerator/titanium_mobile/commit/dfaf1ed0c05c7...
\nAnd and email to try and figure out what the API is.

\n

These are all the features that we can access for the iPhone.\nWhether or not we do is what I'd like to consider.\nReloadRowsAtIndexPaths would be useful for single or several rows'\ndata changing, in an animated way. Insert rows and delete rows are\nsimilarly important to expose. I'd really not want to simply change\nthe javascript object and bulk upload again, because 1) the JSON\nencoding is expensive, 2) the JSON decoding is expensive, 3)\n-[reloadData] on a UITableView is expensive, 4) doing -[reloadData]\nduring an animation or user interaction puts the UITableView into a\nvery strange/buggy/unresponsive state.

\n

However, it might be good to not expose beginUpdates and\nendUpdates, unless doing multiple row animated edits simultaneously\ncauses crashing.
\n- Hide quoted text -

\n

On Jul 28, 2009, at 9:26 PM, Don Thorp wrote:

\n
\n

it seems complex, could we not simply do a setData and take in a\nnew model? Maybe with a selected item?

\n

On Tue, Jul 28, 2009 at 11:18 PM, Blain Hamon\nbhamon@appcelerator.com wrote:

\n
\nI started working on allowing modification of TableView after its creation. I found and squished a few bugs that were introduced when I added views to userWindows.\nHere are the native iPhone commands:\n\n- (void)reloadRowsAtIndexPaths:(NSArray*)indexPaths withRowAnimation:(UITableViewRowAnimation)animation\n- (void)insertRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation\n- (void)deleteRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation\n\nThese are obvious ones to keep, but importance should be placed in that these actions, if not atomic or are delayed, are kept properly serial as to avoid race conditions.\n\n- (void)reloadSections:(NSIndexSet*)sectionswithRowAnimation:(UITableViewRowAnimation)animation\n- (void)insertSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation\n- (void)deleteSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation\n\nThese I'm not so sure about how to expose them, or if they are only for sectioned views, or are they done automatically, but they would be needed when the header and footer are changed.\n\n- (void)selectRowAtIndexPath:(NSIndexPath *)indexPath animated:(BOOL)animated scrollPosition:(UITableViewScrollPosition)scrollPosition\n- (void)deselectRowAtIndexPath:(NSIndexPath *)indexPath animated:(BOOL)animated\n\nThese might be useful, although for the most part, we already control this (The deselection is done during a click, and selection is only by the user's actions)\n\n- (void)beginUpdates\n- (void)endUpdates\n\nThis becomes a sticky wicket, as beginUpdates delay all the actions/animations as well as the reindexing.\n\nSo given rows of [A, B, C]\nand delete of index 0 and 1, without beginUpdates and endUpdates, would be:\n[A,B,C] -> delete index 0\n[B,C] -> delete index 1\n[B]\n\nvs.\n\n[A,B,C] -> beginUpdates\n[A,B,C] -> delete index 0\n[A,B,C] -> delete index 1\n[A,B,C] -> endUpdates\n[C]\n
{html}", "attachment": [], "flagged": false, "summary": "Implement TableView data updating (Android)", "creator": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [], "maxResults": 0, "total": 0, "startAt": 0 } } }