> On 2015 May 23, at 07:10, Marek Hrušovský <xhrus...@gmail.com> wrote: > > Haven't read all the thread but i would use a custom property with overridden > setter to call setNeedsDisplay with combination of > keyPathsForValuesAffectingValueForKey: I think you can get rid of the glue > code.
Yes, but you don’t need an overridden setter. Amy Worral explains it here: http://stackoverflow.com/questions/6354368/how-to-observe-change-in-nsobject-properties My interpretation is to declare a phantom property such as @property NSInteger lookMaStuffChanged ; then, + (NSSet*)keyPathsForValuesAffectingValueForLookMaStuffChanged { return [NSSet alloc] initWithObjects: @“whatever1”, @“whatever2”, … nil] ; } Finally, observe lookMaStuffChanged with KVO. In fact, the phantom property lookMaStuffChanged is never affected by anything; it’s never even set to anything. Works for me. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com