• 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: KVO and arrays
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: KVO and arrays


  • Subject: Re: KVO and arrays
  • From: mmalcolm crawford <email@hidden>
  • Date: Sun, 2 Jan 2005 23:21:37 -0800


On Jan 2, 2005, at 9:48 PM, kelvSYC wrote:

Suppose I have manual notification of a to-many key foo in my class (ie. it uses indexed accessors).

This doesn't make sense. Use of indexed accessors typically implies automatic notification.

I have a method -bar that radically alters foo ("elements" may be added, removed, or changed programatically). I'm confused whether I should call (in -bar) -will/didChangeValueForKey or willChange:valuesAtIndexes:forKey:, and if the latter, what the first parameter should be.

If you are using manual notifications (i.e. you've overridden automaticallyNotifiesObserversForKey: to return NO for the relevant key), then you follow the pattern described here:
<http://developer.apple.com/documentation/Cocoa/Conceptual/ KeyValueObserving/Concepts/AutoVsManual.html>


mmalc
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: KVO and arrays
      • From: mmalcolm crawford <email@hidden>
References: 
 >KVO and arrays (From: kelvSYC <email@hidden>)

  • Prev by Date: OT: Database of IP locations?
  • Next by Date: Re: OgreKit, onigurama, and named groups
  • Previous by thread: KVO and arrays
  • Next by thread: Re: KVO and arrays
  • Index(es):
    • Date
    • Thread