Bit of Background info, I’m using An NSOutlineView with Core Data.
This Is What I’m trying to do:
-
Retrieve All The objects from the Outline Views Tree Controller.
-
Retrieve the ‘name’ Property (Core Data) from each of these objects as a String.
-
Finally store the Strings of the ‘name’ Property from all the Objects in an NSArray.
For extra help, here is a Picture of my Core Data Model, http://snapplr.com/xqxv
Is this possible?
You don’t need to go to the treeController to get your objects, you can query your ManagedObjectContext directly.
You essentially create and execute a fetch request, which returns an NSArray. You set the predicate for the fetch in this process as well, so if you are using it to try and filter your data this is useful as well.
Here is the example from the Apple Documentation on Fetching Managed Objects.