• 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: indexed accessor properties and NSArray/NSMutableArray's
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: indexed accessor properties and NSArray/NSMutableArray's


  • Subject: Re: indexed accessor properties and NSArray/NSMutableArray's
  • From: Jeff Johnson <email@hidden>
  • Date: Tue, 5 Aug 2008 20:11:25 -0500

On Aug 5, 2008, at 7:27 PM, Roland King wrote:

Thanks. There's always just ONE more piece of documentation to read isn't there. So here's my (possibly) last question. If you define neither the accessor methods nor a getter/setter and make mutableArrayValueByKey use direct access to the variables, will that generate KVO notifications?

Yes, assuming that there is an observer for the keypath @"myArray". For example, calling [[myObject mutableArrayValueForKey:@"myArray"] addObject:@"test"] will trigger -will/ didChange:valueAtIndexes:forKey: notifications. The observer's - observeValueForKeyPath:ofObject:change:context: method will be called with change type NSKeyValueChangeInsertion.


-Jeff

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


References: 
 >indexed accessor properties and NSArray/NSMutableArray's (From: Roland King <email@hidden>)
 >Re: indexed accessor properties and NSArray/NSMutableArray's (From: Jeff Johnson <email@hidden>)
 >Re: indexed accessor properties and NSArray/NSMutableArray's (From: Roland King <email@hidden>)
 >Re: indexed accessor properties and NSArray/NSMutableArray's (From: Jeff Johnson <email@hidden>)
 >Re: indexed accessor properties and NSArray/NSMutableArray's (From: Roland King <email@hidden>)

  • Prev by Date: Re: Localize App Title?
  • Next by Date: Re: Bindings to display an NSArray of NSStrings as a single NSString?
  • Previous by thread: Re: indexed accessor properties and NSArray/NSMutableArray's
  • Next by thread: IKSlideshow Question
  • Index(es):
    • Date
    • Thread