Re: Core Data: rules for custom managed object setter implementations
Re: Core Data: rules for custom managed object setter implementations
- Subject: Re: Core Data: rules for custom managed object setter implementations
- From: Jerry Krinock <email@hidden>
- Date: Fri, 20 Nov 2009 18:48:09 -0800
Well, maybe if I give a wrong answer at least we'll get a discussion started.
On 2009 Nov 20, at 08:32, Sean McBride wrote:
> If I implement a custom setter for an NSManagedObject attribute, what
> can I do?
I do lots of stuff -- in particular, sending notifications to implement business logic -- invoking other setters. For example, one of my objects has a 'lastModified' date attribute which gets set via such a notification when certain other attributes are changed.
> can't I do?
Try not to do anything which starts an infinite loop ;)
> For example, can I do nothing if the old and new values are the same?
I have considered doing that but can't find any such examples right now. (Regarding my 'lastModified' attribute, my notification receiver tests for new != old.)
_______________________________________________
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