Re: NSArrayController array-observation
Re: NSArrayController array-observation
- Subject: Re: NSArrayController array-observation
- From: Dominik Wagner <email@hidden>
- Date: Wed, 3 Dec 2003 20:41:27 +0100
On 03.12.2003, at 20:09, mmalcolm crawford wrote:
Hmm, I started implementing this, and it wasn't as much work as I
initially thought. Things worth mentioning:
- The indexed Accessors for to-many properties only get called if you
don't have normal accessors (-<key>, -set<key>)
Not so, as you'll see if you add logging statements to:
<http://homepage.mac.com/mmalc/CocoaExamples/AddaYearWithArrayKVC.zip>
The "normal" get and set methods are called for getting and setting
the whole array, but if you add or remove individual elements the
appropriate indexed accessors are called.
Oh sorry, my course of implementation lead me the wrong way. What's
actually true is that the modifying accessors are used when present,
whereas the "getter" accessors countIn<key> and objectIn<Key>AtIndex
only get called, when the -<key> accessor is not present.
At least that it is what your Sample Code shows, when I add NSLogs. And
it is consitent with the results I got while implementing my Stuff for
RendezCon.
Cheers,
Dom
--
Dominik Wagner Mail: email@hidden
TheCodingMonkeys
http://www.codingmonkeys.de/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.