"Library" smart group in Core Data
"Library" smart group in Core Data
- Subject: "Library" smart group in Core Data
- From: Ben Kazez <email@hidden>
- Date: Fri, 27 Jan 2006 16:52:58 -0600
I'm developing a Core Data application with an interface similar to
iTunes, iPhoto, and other applications, in which a Source table lists
a group called "Library" that contains all the items the application
manages. In this case, Core Recipes creates a separate in-memory
store for the Library group. This makes sense but results in some
extra code (scattered around the application) to ensure that created
objects are put in the right store and that relationships don't cross
stores.
I'd like to solve this by returning a Library smart group in the -
arrangedObjects method of a custom NSArrayController. I need to
create the Library object (once) but not save it. Is it best to
insert it into a temporary managed object context that I make sure I
never save (seems risky, even though I trust myself :-)), or am I
overlooking a simpler solution? Perhaps I'm wrong in preferring this
to the in-memory store approach?
I only need one "normal" (saved) managed object context for this
application. However, I suppose this could change in a future version
of the application.
Thanks!
Ben
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden