Re: CoreData, Object/Array Controllers and KVO
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