• 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
Core Data, Threads and Document based app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Core Data, Threads and Document based app


  • Subject: Core Data, Threads and Document based app
  • From: "Thomas T" <email@hidden>
  • Date: Fri, 11 Apr 2008 08:37:43 +0200

Hello

 I am writing a document based core data app where I delegate som work
 to an NSOperation subclass. This subclass should download stuff from
 the internet and then create managed objects.
 In my non-document based apps I have handled multithreading with a
 separate NSManagedObjectContext for each thread.
 I suppose I should do something similar in this app. But then a
 problem arises....
 The document is not necessarily saved when my download operation begins. So ..

 - How can I create objects in my nsoperation when I don't have a
 persistent store yet. I really couldn't ask the user to save the
 document before beginning the download.
 - In document based apps - how should I create my second
 NSManagedObject context for use in my nsoperation?

 One possible solution (or workaround) is to just have my operation
 download the data from the internet but have my main thread handle the
 managed object creation. But that doesn't seem clean to me.

 regards,
 Thomas T.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Core Data, Threads and Document based app
      • From: Jeff LaMarche <email@hidden>
  • Prev by Date: Re: Making use of Core 2 features without 64bit addressing
  • Next by Date: Re: Question about NSTreeController/NSOutlineView instance cleanup
  • Previous by thread: Re: NSArrayController's "selectionIndex" weirdness
  • Next by thread: Re: Core Data, Threads and Document based app
  • Index(es):
    • Date
    • Thread