-
-
Notifications
You must be signed in to change notification settings - Fork 727
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generalized “TableViewEvent” for both platforms & more views #160
Conversation
* TableViewEvent features of FetchedRecordsController supported on all platforms * Renamed TableViewEvent to FetchedRecordsChangeEvent * Renamed TableViewChange to FetchedRecordsChange
Other notes:
|
Hello @kdubb! Wow, thanks for this PR. Yes, I overlooked both macOS 10.10 additions, and the fact that collection views are compatible with table views regarding the insertion/deletion/moving of cells: there is no need to restrict those APIs to iOS, and there is no need to use Now it happens that your work overlaps an on-going refactoring process that happens in the RX branch, so I wonder if I should merge your PR, or combine our ideas together in RX, until it lands in master. In RX, I'm trying to achieve two main goals:
In the process, a few other sub-goals have emerged:
That's the current state of affairs. What do you think? |
I think I like most of these changes, although I'll need to experiment with the actual implementations to make sure they were fine for use (first glance all seems well). As for timing... I'd love to see this PR merged (since it's fairly simple). It's only effect on most end users would be renaming Some thoughts on naming in RX...
|
I'm inclined on this side as well. New Year's Eve is coming so I guess we'll have to wait a little bit nevertheless.
You're right. NSFetchedResultsController has been a tremendous inspiration. Eventual diverging is natural, but also questioning. For example, you're developing on macOS, which uses bindings, NSArrayController, et al. I suppose that NSFetchedResultsController was a perfect fit for the macOS platform. Nowadays new patterns are emerging, but throwing the baby out with the bathwater could be stupid. That's why I think the RX branch will take a while to complete, and I'm seriously considering merging your PR before. Give me a few days – no new development will happen in GRDB, and your fork will remain ahead of master. |
I made a private fork with very similar changes for a side-project (did not have a chance to package them up nicely for a PR), so I'm 100% in support of this change. 👍 |
Welcome @kdubb to the GRDB contributors! v0.100.0 (a nice version number) will ship after FetchedRecordsController outdated documentation has been updated. |
Here we go: v0.100.0 is out. @kdubb I took the liberty to introduce a couple other modifications on FetchedRecordsController. And custom SQLite has been bumped to 3.16.2, thanks to @swiftlyfalling's SQLiteLib. |
There is nothing specific to
UITableView
in the implementation ofTableViewEvent
features. The events are useful to users ofUICollectionView
also. Finally, as of macOS 10.10, both view types are now supported on macOS. For all these reasonsTableViewEvent
features were migrated to support both platforms & renamed not to confuse end users who might be thinking they're only for table views.