• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSArrayController array-observation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: NSArrayController array-observation (From: Dominik Wagner <email@hidden>)
 >Re: NSArrayController array-observation (From: mmalcolm crawford <email@hidden>)

  • Prev by Date: Re: NSArrayController array-observation
  • Next by Date: Bug-Resolution Follow-Up
  • Previous by thread: Re: NSArrayController array-observation
  • Next by thread: Cocoa / Obj-C and Zip files
  • Index(es):
    • Date
    • Thread