Open jamonholmgren opened 9 years ago
The problem happens because of the existence of the tableView:commitEditingStyle:forRowAtIndexPath: method. As long as it exists VoiceOver will falsely report the cell as deletable. Some metaprogramming might fix this. Oh.. except RubyMotion doesn't have define_method. Oh dear... Well there goes that idea.
We could extend the TableScreen instance with a module, something like this:
module ProMotion::Table::Deletable
def tableView:commitEditingStyle:forRowAtIndexPath: # < i know this is wrong, in a hurry
end
end
...
screen.extend(PM::Table::Deletable) if @deletable # whatever
Ah yes, much simpler. Yes, include the module if the table has any cells with an editing style of delete or insert.
Please see pull request #678
:+1:
As per #690, including the tableView:commitEditingStyle:forRowAtIndexPath:
in a extended module breaks actual deleting functionality. I'm pretty sure that it has to be included in the class when the class is loaded and not included modularly in order for the table cells to actually be deletable.
Based on https://gist.github.com/d-ronnqvist/3584ccf3379f9c318e4f I think i may have found a valid solution to this. @austinseraphin can you please check out the branch bug/690-edit-table
and let me know if this works with accessibility?
Yes this works.
Perhaps unrelated, when I have the editing style set to insert it still says swipe to delete. I don’t know if this happens because of a VoiceOver bug or a bug in ProMotion. I’ll dig a little. But for now the regular cells don’t report any actions, the original point of this bug report.
On May 14, 2015, at 12:28 PM, Mark Rickert notifications@github.com wrote:
Based on https://gist.github.com/d-ronnqvist/3584ccf3379f9c318e4f https://gist.github.com/d-ronnqvist/3584ccf3379f9c318e4f I think i may have found a valid solution to this. @austinseraphin https://github.com/austinseraphin can you please check out the branch bug/690-edit-table and let me know if this works with accessibility?
— Reply to this email directly or view it on GitHub https://github.com/clearsightstudio/ProMotion/issues/653#issuecomment-102094176.
Per @austinseraphin's tweet: https://twitter.com/AustinSeraphin/status/582650809772568576