Re: Multithreaded Coredata save in Lion
Re: Multithreaded Coredata save in Lion
- Subject: Re: Multithreaded Coredata save in Lion
- From: Jim Thomason <email@hidden>
- Date: Mon, 01 Aug 2011 09:24:43 -0500
> -saveDocument: has never been expected to do its work immediately. Instead, you want to call:
>
> -saveDocumentWithDelegate:didSaveSelector:contextInfo:
>
> Then, when the delegate is called, spawn off your new MOC.
That's exactly what I needed. A little rewiring of the app to use the
delegate method and hand in a few new flags regarding whether any
changes were saved and I'm back in business. Guess it was just dumb
luck that it consistently behaved the other way on the older OSes.
And, incidentally, I'd say that the auto-save is justified - it's at a
point where the user should have saved all changes anyway ("Okay, my
data is stable. Now analyze it."), so it just saves it for them if
necessary instead of prompting to require it.
Thanks!
-Jim.....
_______________________________________________
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