Say I have a bunch of Article objects stored within the core data model. Each article maintains, a reading progress attribute which denotes how much of the article has been read by the user. Once the user has read the article fully, the article is marked as "Read". Before that, it would be marked "Unread".
Now I have an NSTableView bound to a NSArrayController containing all the Article objects stored using CoreData. I want it to display all unread articles under an "Unread" group, and all read articles under the "Read" group.
I know about the method
- (BOOL)tableView:(NSTableView *)tableView isGroupRow:(NSInteger)row
in the NSTableViewDelegate. However, this insinuates that we must have actual rows saying "Read" and "Unread" within the NSArrayController that will be promoted to group. Since the NSArrayController contains Article objects pulled from CoreData, how do I go about doing this?
NB: This is my first question here, and I'm new to Cocoa, please go easy on me :)