Re: Core Data and the Document Dirty indicator
Re: Core Data and the Document Dirty indicator
- Subject: Re: Core Data and the Document Dirty indicator
- From: "I. Savant" <email@hidden>
- Date: Fri, 11 Apr 2008 14:41:04 -0400
> When a Core Data document is opened initialization adds an entity for the
> basic 'All' smart group. This object is assigned to an in memory store
> (rather than to the persistent document) - I have checked and the 'All' item
> doesn't appear in the saved data.
... but a context has changed. That's a change. It can result in an
undo. Period.
>
> My problem is that adding this item results in the 'dirty' flag being set -
> with the result that the user is prompted to save the document even though
> they have not made any changes.
This isn't a Core Data problem. It's an Undo Manager problem. See
-[NSUndoManager removeAllActions] ... simply clear the changes when
you're done with your initialization routines.
You can also temporarily disable and enable undo registration. That
and the method above are covered and easily found in the
documentation.
--
I.S.
_______________________________________________
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