• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Core Data: How to Observe "dirty" State?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data: How to Observe "dirty" State?


  • Subject: Re: Core Data: How to Observe "dirty" State?
  • From: Keary Suska <email@hidden>
  • Date: Sun, 11 May 2008 09:33:04 -0600
  • Thread-topic: Core Data: How to Observe "dirty" State?

on 5/10/08 7:54 PM, email@hidden purportedly said:

> On May 10, 2008, at 12:03 PM, Dave Fernandes wrote:
>
>> 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.
>
> I would also expect that you can observe your NSManagedObjectContext's
> "hasChanges" property using KVO.

That's what I tried first, which wasn't working, before I read the docs
further:

"This property is not key-value observing compliant (see Key-Value Observing
Programming Guide)‹if you are using Cocoa bindings, you cannot bind to the
hasChanges property of a managed object context."

That would have been perfect. Maybe I will submit an enhancement radar to
get this value KVO compliant.

The notification will actually work well for my purposes. That option should
have been obvious but I guess this is my d'oh! du jour.

Thanks,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"


_______________________________________________

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

References: 
 >Re: Core Data: How to Observe "dirty" State? (From: Chris Hanson <email@hidden>)

  • Prev by Date: Re: Sleep Display
  • Next by Date: Re: gathering system information
  • Previous by thread: Re: Core Data: How to Observe "dirty" State?
  • Next by thread: iChat theater
  • Index(es):
    • Date
    • Thread