{ "id": "61134", "key": "TIMOB-502", "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": "11223", "name": "Release 1.3.0", "archived": true, "released": true, "releaseDate": "2010-05-05" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:53:18.000+0000", "created": "2011-04-15T02:30:26.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "bug", "ios", "iphone", "tableview" ], "versions": [], "issuelinks": [], "assignee": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:53:18.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}

When setting both 'editing' & 'moving' to true on a\ntableView, only the first instruction is taken.

\n

edit.addEventListener('click', function(){

\n
\nwin.setRightNavButton(cancel);\ntableView.moving = true;\ntableView.editing = true;\n
\n

});

\n

When edit is clicked the tableView will only go into moving\nmode, not edit too.

{html}", "attachment": [], "flagged": false, "summary": "Setting both 'moving' & 'editing' on a tableView doesn't work", "creator": { "name": "jameswragg", "key": "jameswragg", "displayName": "James Wragg", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jameswragg", "key": "jameswragg", "displayName": "James Wragg", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "123402", "author": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "body": "{html}

Yeah, we made them multi-exclusive on purpose. not sure that's\nthe right thing. can you explain your use case so we can better\nunderstand how to make it work in this case?

{html}", "updateAuthor": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:30:27.000+0000", "updated": "2011-04-15T02:30:27.000+0000" }, { "id": "123403", "author": { "name": "jameswragg", "key": "jameswragg", "displayName": "James Wragg", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Thanks for the prompt response Jeff. I have seen the re-order\n& delete actions combined as a single edit mode in many apps\n(e.g. edit your bookmarks in Safari) & wish to recreate simply\ndue to lack of screen real estate.

{html}", "updateAuthor": { "name": "jameswragg", "key": "jameswragg", "displayName": "James Wragg", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:30:27.000+0000", "updated": "2011-04-15T02:30:27.000+0000" }, { "id": "123404", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Notes to self:

\n

Okay, taking a deep look at this, and part of the problem is\nthat the iPhone OS considers moving and editing to be one and the\nsame. So on setting movable or editable, the iPhone UITableView\nqueries things before there's time for the other to be set.

\n

Currently, Ti.UI.TableView has 3 properties: editable, editing,\nand moving
\nTi.UI.TableViewRow has 4: editable, indentOnEdit, movable,\nindentationLevel.

\n

So to make this work, you need some way to express intent to\nmove and to edit before going to moving/editing.

\n

On a table currently, editable allows for editing (Swipe to\ndelete) when not in edit mode. Entering edit mode with delete only\nis by editing, and entering edit mode with movement only is\nmoving.

\n

For a table row, indentationLevel and indentOnEdit don't play\nmuch of a part.

\n

So, noting that booleans can be true, false, or undefined/null\n(which is neither true nor false):

\n

A row will be movable if
\n1. ((row.movable==true) AND (table.editing == true)) OR
\n2. ((row.movable!=false) AND (table.moving == true))

\n

A row will be always editable (swipe-to-deletable) if
\n1. (row.editable==true) OR
\n2. ((row.editable!=false) AND (table.editable==true))

\n

A row will be editable during editing if
\n1. (row.editable==true) OR
\n2. ((row.editable!=false) AND (table.editable==true)) OR
\n3. ((row.editable!=false) AND (table.editing==true))

{html}", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:30:27.000+0000", "updated": "2011-04-15T02:30:27.000+0000" }, { "id": "123405", "author": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "body": "{html}

(from [9de20f5445eff867b9d3ece18d32599443f97ee0])\nCloses #502 \nhttp://github.com/appcelerator/titanium_mobile/commit/9de20f5445eff...

{html}", "updateAuthor": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:30:28.000+0000", "updated": "2011-04-15T02:30:28.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }