• 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: CoreData, Object/Array Controllers and KVO
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CoreData, Object/Array Controllers and KVO


  • Subject: Re: CoreData, Object/Array Controllers and KVO
  • From: Quincey Morris <email@hidden>
  • Date: Thu, 14 Aug 2008 14:34:57 -0700

On Aug 14, 2008, at 13:49, Jeff Hellman wrote:

As soon as I bind the text field value to a key path (self.title or
just title) in the ObjectController, then the below methods are called
for each and every key in my ManagedObject.

It sounds like your object is being fetched with its properties faulted (well ... unloaded), until the properties are needed when the binding is established. At that point, perhaps, the properties are loaded, and set into the object with setValue:forKey:.


The real question is this:  I'd like to set a "lastUpdated" key with
the current time when a change is made to the object.  Obviously,
opening the file doesn't constitute a change being made so I can't
have the currentTime being set upon file open without problems.

I think you'll have to do this at a different level. The assumption that setValue:forKey: (and hence will/didChange...) will be called only for a "genuine" change is untenable. At the very least, I think, the assumption is going to break when you undo a change.



_______________________________________________

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: 
 >CoreData, Object/Array Controllers and KVO (From: "Jeff Hellman" <email@hidden>)
 >Re: CoreData, Object/Array Controllers and KVO (From: "I. Savant" <email@hidden>)
 >Re: CoreData, Object/Array Controllers and KVO (From: "Jeff Hellman" <email@hidden>)

  • Prev by Date: Re: @try @catch
  • Next by Date: Making a bound view re-read its value
  • Previous by thread: Re: CoreData, Object/Array Controllers and KVO
  • Next by thread: Re: CoreData, Object/Array Controllers and KVO
  • Index(es):
    • Date
    • Thread