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.
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.