Say I have a bunch of article objects stored in a basic data model. Each article supports the reading progress attribute, which indicates which part of the article has been read by the user. After the user has fully read the article, the article is marked as "Reading." Prior to that, it would have been marked as "Unread."
Now I have an NSTableView associated with an NSArrayController containing all article objects stored using CoreData. I want it to display all unread articles in the Unread group and all read articles in the Reading group.
I know about the method
- (BOOL)tableView:(NSTableView *)tableView isGroupRow:(NSInteger)row
in an NSTableViewDelegate. However, this indicates that we should have real lines with the words "Read" and "Unread" in the NSArrayController, which will be promoted to the group. Since NSArrayController contains article objects extracted from CoreData, how do I do this?
NB: This is my first question here, and I'm new to Cocoa, please, easy on me :)
Mutahhir
source share