Reputation: 2547
I am developing a cocoa app which has NSOutlineView which is binded to NSTreeController with CoreData integration.
For some purposes, I am deleting some of the nodes in NSTreeController by
MyTreeController.removeObjectAtArrangedObjectIndexPath(someIndexPath)
But than, I need to reload the NSTreeController back from CoreData by using the current binding. However, I couldn't find a solution because NSTreeController has no reload data function.
Any help or a workaround will be appreciated.
Upvotes: 0
Views: 281
Reputation: 46728
Calling -removeObjectAtArrangedObjectIndexPath
against a NSTreeController
that is associated with Core Data will remove the object from Core Data.
Calling -fetch:
afterwards is going to cause the data to return, it has been deleted.
Upvotes: 2