-
-
Notifications
You must be signed in to change notification settings - Fork 241
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
Throw assertion when attempting to inject section changes on AppKit #95
base: master
Are you sure you want to change the base?
Conversation
I prefer NSCollectionView to support sections instead of asserts. |
@helje5 |
To be honest I don't understand what you are saying / trying to say :-)
You mean you prefer DifferenceKit to support NSCollectionView sections? Yeah, I'd prefer that too, but while that isn't available, asserts seem to be way to go? Otherwise people, like me, run into this and wonder why it isn't working.
You mean you prefer DifferenceKit to support NSTableView groups (same like sections, just w/ a different API)? Yeah, I'd prefer that too, but while that isn't available, asserts seem to be way to go? Otherwise people, like me, run into this and wonder why it isn't working. |
@helje5 |
I agree! And until that works, have the assertion, a one line change.
Don't have the time right now to check it out, maybe?
Your understanding is wrong. NSTableView has groups which is the same thing like UIKit sections, it just has a (quite) different API for that. So the task here would be to either provide a fascade which makes it work, or have a version of the algorithm running against the tableview representation of the data.
Assertions only stop the app when building them in debug mode. They exist specifically to help during development and are inactive when building in release mode. I think there is no reason not to enable them. |
Section changes are not supported yet on AppKit (neither
NSCollectionView nor NSTableView, see issues #93/#94).
Checklist
Description
Just added a single assertion to both extensions:
Related Issue
NSTableView
sections (aka group rows) #93 for NSTableViewNSCollectionView
sections #94 for NSCollectionViewMotivation and Context
Without the assertion, the extensions silently drop changes / do the wrong thing. This way we can at least catch them in debug mode.
Impact on Existing Code
No impact.
Screenshots (if appropriate)