Key-Value-Observing and Collections

Philip Mötteli Philip.Moetteli at tele2.ch
Thu Oct 25 08:01:37 PDT 2007


Am 25.10.2007 um 16:47 schrieb Christiaan Hofman:

> You should avoid that, in particular for collection keys (for those  
> there are other variants that allow you to pass precisely what has  
> changed). A much better and easier solution is to follow the docs:  
> use KVC compliant array accessors, like  
> insertObject:inGradesAtIndex:, which automatically send the correct  
> notifications.

And how do I register as an observer?
	[theCollection addObserver:anObserver forKeyPath:???? options:0  
context:NULL];



What do I have to use as the key(path)?


Thanks
Phil



More information about the MacOSX-dev mailing list