• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: CoreData: Single coordinator, multiple contexts?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CoreData: Single coordinator, multiple contexts?


  • Subject: Re: CoreData: Single coordinator, multiple contexts?
  • From: Scott Stevenson <email@hidden>
  • Date: Fri, 29 Apr 2005 16:15:49 -0700


On Apr 29, 2005, at 4:03 PM, Paul Mix wrote:

As an example, say I'm writing a program to keep track of Personnel. The primary entities would be Person and Group. I'd like to store all these entities in a single SQLite database using CoreData. However, rather than using a single "document" with a master/detail interface, I'd rather have one window showing a list of all Persons or Groups, and a separate editor "document" window to edit each Person or Group. These editor windows should behave just like normal a normal NSPersistentDocument with regards to how it interacts with the store, but I want all of the documents to read and write from the same database file on disk. Changes made in one Person editor would not affect those in any other editor until the document was saved (i.e. the changes committed).

What's the best approach for handling a paradigm such as this?

If I understand what you're asking, the question doesn't really affect Core Data per say. You only need one document and perhaps only one nib. All you really need is two windows, and maybe one is an inspector.


If this is a single data file application (ala iTunes), then this is super-easy because you can just bind your array controllers to the AppDelegate's Managed Object Context and all of them will have access to the same data.


- Scott

--
http://treehouseideas.com/
http://theocacao.com/ [blog]

_______________________________________________
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


References: 
 >Re: CoreData Best Practices (From: John Timmer <email@hidden>)
 >Re: CoreData Best Practices (From: Scott Ellsworth <email@hidden>)
 >CoreData: Single coordinator, multiple contexts? (From: Paul Mix <email@hidden>)

  • Prev by Date: Re: CoreData Best Practices
  • Next by Date: Re: [Moderator] Re: NDA lifted?
  • Previous by thread: CoreData: Single coordinator, multiple contexts?
  • Next by thread: Re: CoreData: Single coordinator, multiple contexts?
  • Index(es):
    • Date
    • Thread