Re: Very different Document Saving in Lion, even without enabling asynchronous
Re: Very different Document Saving in Lion, even without enabling asynchronous
- Subject: Re: Very different Document Saving in Lion, even without enabling asynchronous
- From: Dave Fernandes <email@hidden>
- Date: Sun, 21 Aug 2011 01:12:40 -0400
I had a problem with this as well. I had not enabled asynchronous saving, but I was reading the document metadata after a saveDocument: call (not even an overridden method, mind you, but just in the same event cycle on the main thread); and this was causing infinite recursion.
I fixed it by using saveToURL:ofType:forSaveOperation:completionHandler: instead of saveDocument:, and put the metadata reading calls into the completion handler.
On 2011-08-21, at 12:46 AM, Jerry Krinock wrote:
>
> On 2011 Aug 17, at 16:30, Mike Abdullah wrote:
>
>> Seeing as you knew it called an asynchronous method internally, you must have known that it might potentially return before saving is finished.
>
> Thank you, Mike. I'm not surprised to see the new behavior after enabling asynchronous saving. The surprise is the new behavior *without* enabling synchronous saving (it should still be "synchronous"), and the fact that it is now it behaves completely different from what is shown in the documentation, and there is no mention of this change in the Release Notes.
>
> _______________________________________________
>
> 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
_______________________________________________
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