Skip navigation.
 
mlRe: Core Data: How to Observe "dirty" State?
FROM : Dave Fernandes
DATE : Sat May 10 21:03:03 2008

You can also register for the 
NSManagedObjectContextObjectsDidChangeNotification to get a 
notification when anything in the MOC changes. Presumable you can 
then check [moc hasChanges], but I've never used that method.

Dave

On May 10, 2008, at 2:46 PM, Keary Suska wrote:

> Does anyone know how to "watch" for the dirty state of an
> NSManagedObjectContext (if that's where it is applicable)? I 
> imagine the
> same way that NSPersistentDocument can do it, if that is feasible.
>
> I know I can observe all of the properties in a managed object and 
> set a
> flag when a change occurs (and also check NSUndoManager so I know 
> when I get
> to a properly "clean" state), but I was hoping there was a cleaner 
> and more
> robust way.
>
> TIA,
>
> Keary Suska
> Esoteritech, Inc.
> "Demystifying technology for your home or business"
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (<email_removed>)
>
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/dave.fernandes%
> 40utoronto.ca
>
> This email sent to dave.<email_removed>

Related mailsAuthorDate
mlCore Data: How to Observe "dirty" State? Keary Suska May 10, 20:46
mlRe: Core Data: How to Observe "dirty" State? I. Savant May 10, 20:54
mlRe: Core Data: How to Observe "dirty" State? Dave Fernandes May 10, 21:03
mlRe: Core Data: How to Observe "dirty" State? Chris Hanson May 11, 03:54
mlRe: Core Data: How to Observe "dirty" State? Dave Fernandes May 11, 07:40
mlRe: Core Data: How to Observe "dirty" State? I. Savant May 11, 15:04
mlRe: Core Data: How to Observe "dirty" State? Hamish Allan May 11, 16:36
mlRe: Core Data: How to Observe "dirty" State? Keary Suska May 11, 17:33