Re: Advice on document handling
Re: Advice on document handling
- Subject: Re: Advice on document handling
- From: Kyle Sluder <email@hidden>
- Date: Fri, 20 Jun 2014 10:53:00 -0700
On Fri, Jun 20, 2014, at 10:33 AM, Jerry Krinock wrote:
>
> On 2014 Jun 19, at 22:15, John Brownie <email@hidden> wrote:
>
> > Looks like I need to keep a local flag for when the document gets changed and when it gets saved.
>
> No, you can just use -[NSDocument isDocumentEdited].
>
> Back when Auto Save first appeared, in OS X 10.7, I too found that it was
> pestering me too often with autosaves when nothing had changed.
As per the documentation, the first thing that -[NSDocument
autosaveWithImplicitCancellability:…] does is send
-hasUnautosavedChanges to itself and bail if that method returns NO. So
I don't see what advantage you gain by overriding this method to check
-isDocumentEdited, unless you have somehow broken the relationship
between -isDocumentEdited and -hasUnautosavedChanges.
--Kyle Sluder
_______________________________________________
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