Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSArrayController and the single NSMutableArray




On May 4, 2005, at 5:11 PM, Glen Low wrote:

Surely addObject: qualifies as "one of the key-value-coding-compliant array mutation methods"? (Or do I really have to -willChange:valuesAtIndexes:forKey every time I touch the NSMutableArray??)


I haven't played with this particular issue on Tiger yet, but Panther required that do some special things to make this work. Two of the more popular options are:

1. Implement indexed accessors for the key:
<http://developer.apple.com/documentation/Cocoa/Conceptual/KeyValueCoding/Concepts/AccessorConventions.html#//apple_ref/doc/uid/20002174-178830-BAJEDEFB>

2. Use the array proxy returned from -mutableArrayValueForKey: instead of the array itself. This approach is much cleaner in my opinion, but it is possibly slower than the other.


   - Scott



--

http://treehouseideas.com/

http://theocacao.com/ [blog]



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

References: 
 >NSArrayController and the single NSMutableArray (From: Glen Low <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.