Re: Getting notified of any change to a specific NSManagedObject?

2012-11-19 Thread Mike Abdullah
On 16 Nov 2012, at 22:00, Rick Mann rm...@latencyzero.com wrote: On Nov 16, 2012, at 2:31 , Mike Abdullah cocoa...@mikeabdullah.net wrote: Why are you trying to avoid a bunch of these calls? Is it just to save yourself typing? Typing, and code maintenance. I generally have UI that

Re: Getting notified of any change to a specific NSManagedObject?

2012-11-16 Thread davelist
On Nov 15, 2012, at 8:22 PM, Rick Mann wrote: On Nov 15, 2012, at 17:04 , Kyle Sluder k...@ksluder.com wrote: Override -didChangeValueForKey:? Apparently we are strongly discouraged from overriding those methods. :-) -- Rick Is this documented? What would be wrong with overriding

Re: Getting notified of any change to a specific NSManagedObject?

2012-11-16 Thread Kyle Sluder
On Nov 16, 2012, at 9:29 AM, davel...@mac.com wrote: On Nov 15, 2012, at 8:22 PM, Rick Mann wrote: On Nov 15, 2012, at 17:04 , Kyle Sluder k...@ksluder.com wrote: Override -didChangeValueForKey:? Apparently we are strongly discouraged from overriding those methods. :-) -- Rick

Re: Getting notified of any change to a specific NSManagedObject?

2012-11-16 Thread Dave Reed
On Nov 16, 2012, at 12:37 PM, Kyle Sluder wrote: On Nov 16, 2012, at 9:29 AM, davel...@mac.com wrote: On Nov 15, 2012, at 8:22 PM, Rick Mann wrote: On Nov 15, 2012, at 17:04 , Kyle Sluder k...@ksluder.com wrote: Override -didChangeValueForKey:? Apparently we are strongly

Re: Getting notified of any change to a specific NSManagedObject?

2012-11-16 Thread Jerry Krinock
Either make the dependent property as Sean suggested, or write custom setters to post or enqueue a notification. Either is appropriate in different situations. But, indeed, don't second-guess Apple's strong recommendations. I always think of those as, There is some ugly stuff going on under

Re: Getting notified of any change to a specific NSManagedObject?

2012-11-16 Thread Rick Mann
On Nov 16, 2012, at 2:31 , Mike Abdullah cocoa...@mikeabdullah.net wrote: Why are you trying to avoid a bunch of these calls? Is it just to save yourself typing? Typing, and code maintenance. I generally have UI that displays all (or some subset of) the properties of one of my entities. I'd

Re: Getting notified of any change to a specific NSManagedObject?

2012-11-16 Thread Kyle Sluder
On Fri, Nov 16, 2012, at 02:00 PM, Rick Mann wrote: On Nov 16, 2012, at 2:31 , Mike Abdullah cocoa...@mikeabdullah.net wrote: Why are you trying to avoid a bunch of these calls? Is it just to save yourself typing? Typing, and code maintenance. I generally have UI that displays all

Getting notified of any change to a specific NSManagedObject?

2012-11-15 Thread Rick Mann
I know I can use KVO on a specific property of my NSManagedObject, but is there a way to get notified if any property changes? I'm trying to avoid a bunch of -addObserver:… and -removeObserer:… calls. I know I can listen for the context did save notification, but I'd rather catch the changes

Re: Getting notified of any change to a specific NSManagedObject?

2012-11-15 Thread Rick Mann
On Nov 15, 2012, at 16:19 , Rick Mann rm...@latencyzero.com wrote: I know I can use KVO on a specific property of my NSManagedObject, but is there a way to get notified if any property changes? I'm trying to avoid a bunch of -addObserver:… and -removeObserer:… calls. I know I can listen

Re: Getting notified of any change to a specific NSManagedObject?

2012-11-15 Thread Sean McBride
On Thu, 15 Nov 2012 16:19:53 -0800, Rick Mann said: I know I can use KVO on a specific property of my NSManagedObject, but is there a way to get notified if any property changes? I'm trying to avoid a bunch of -addObserver:… and -removeObserer:… calls. You could create a dependent key, that

Re: Getting notified of any change to a specific NSManagedObject?

2012-11-15 Thread Rick Mann
On Nov 15, 2012, at 16:32 , Sean McBride s...@rogue-research.com wrote: On Thu, 15 Nov 2012 16:19:53 -0800, Rick Mann said: I know I can use KVO on a specific property of my NSManagedObject, but is there a way to get notified if any property changes? I'm trying to avoid a bunch of

Re: Getting notified of any change to a specific NSManagedObject?

2012-11-15 Thread Kyle Sluder
On Nov 15, 2012, at 4:19 PM, Rick Mann rm...@latencyzero.com wrote: I know I can use KVO on a specific property of my NSManagedObject, but is there a way to get notified if any property changes? I'm trying to avoid a bunch of -addObserver:… and -removeObserer:… calls. I know I can listen

Re: Getting notified of any change to a specific NSManagedObject?

2012-11-15 Thread Rick Mann
On Nov 15, 2012, at 17:04 , Kyle Sluder k...@ksluder.com wrote: Override -didChangeValueForKey:? Apparently we are strongly discouraged from overriding those methods. :-) -- Rick ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do