• 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: Document style programming
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Document style programming


  • Subject: Re: Document style programming
  • From: Luther Baker <email@hidden>
  • Date: Sat, 18 Oct 2014 11:09:34 -0500

Thanks Mike.

Let me ask another question ... what if I need to create a temporary,
thread specific NSManagedObjectContext? Let's say I'm interacting with a
RESTful API ala AFNetworking and I need to parse and save data on a
background response thread.

How do I tie my thread specific context into the Document's datastore?

Thanks,
-Luther


On Sat, Oct 18, 2014 at 11:03 AM, Mike Abdullah <email@hidden>
wrote:

> When using NSPersistentDocument it takes over responsibility for saving
> the context. You should not save the context yourself.
>
> > On 18 Oct 2014, at 17:00, Luther Baker <email@hidden> wrote:
> >
> > Hi,
> >
> > I am creating a Desktop issue tracking app using core data and the
> > NSDocument framework - so yes, the Xcode wizard extended
> > NSPersistentDocument which provides me with an NSManagedObjectContext.
> >
> > My question is - if I start working in the app, creating issues for
> > instance ... when I go to actually persist the context I get an error
> "This
> > NSPersistentStoreCoordinator has no persistent stores.  It cannot
> perform a
> > save operation."
> >
> > So, does this imply that for NSDocument style programming, most folks
> > aren't 'saving' their context right away? Do we wait for the user to
> > actually save the document the first time? IE: there is not in memory
> store
> > that the Document manages until the user formally saves to the file
> system?
> >
> > And does it follow then that on subsequent changes, we formally persist
> the
> > context only when the user actually 'Saves'?
> >
> > Does anyone force the user to 'find' a file location right away, upon
> > opening a new document, and then persist everything happily in the
> > background?
> >
> > I tend to this this is really just a Desktop paradigm question more than
> > anything else.
>
_______________________________________________

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: Document style programming
      • From: Mike Abdullah <email@hidden>
References: 
 >Document style programming (From: Luther Baker <email@hidden>)
 >Re: Document style programming (From: Mike Abdullah <email@hidden>)

  • Prev by Date: Saving a Document style app
  • Next by Date: Re: Saving a Document style app
  • Previous by thread: Re: Document style programming
  • Next by thread: Re: Document style programming
  • Index(es):
    • Date
    • Thread