You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 15, 2020. It is now read-only.
You have to capture the dataSource in the commitEditing closure, as seen here in the example. This also makes it awkward to test. There's a kind of "chicken and egg" problem.
Suggested solution:
Maybe we pass DataSourceProtocol back in this closure? I think that would work.
This would then require moving the remove(at:) methods from the DataSource to the DataSourceProtocol. And we would need to figure out a solution for FetchedResultsController here — probably the hardest part.
We added
TableEditingControllerin #67.There's one awkward thing about the design:
You have to capture the
dataSourcein thecommitEditingclosure, as seen here in the example. This also makes it awkward to test. There's a kind of "chicken and egg" problem.Suggested solution:
Maybe we pass
DataSourceProtocolback in this closure? I think that would work.This would then require moving the
remove(at:)methods from theDataSourceto theDataSourceProtocol. And we would need to figure out a solution forFetchedResultsControllerhere — probably the hardest part.