Re: mutableArrayValueForKey: truth or dare

2010-06-17 Thread Ken Thomases
On Jun 17, 2010, at 8:41 PM, Charles Srstka wrote: > On Jun 17, 2010, at 8:19 PM, Matt Neuburg wrote: > >> On or about 6/17/10 5:56 PM, thus spake "Roland King" : >> >>> if ... you just have a class variable called or _ then the >>> whole array is not replaced, the method you call on >>> NSMut

Re: mutableArrayValueForKey: truth or dare

2010-06-17 Thread Charles Srstka
On Jun 17, 2010, at 8:19 PM, Matt Neuburg wrote: > On or about 6/17/10 5:56 PM, thus spake "Roland King" : > >> if ... you just have a class variable called or _ then the >> whole array is not replaced, the method you call on >> NSMutableArrayValueForKey: >> is passed through to that underlying

Re: mutableArrayValueForKey: truth or dare

2010-06-17 Thread Matt Neuburg
On or about 6/17/10 5:56 PM, thus spake "Roland King" : > if ... you just have a class variable called or _ then the > whole array is not replaced, the method you call on NSMutableArrayValueForKey: > is passed through to that underlying variable which does what you might expect > and operates on

Re: mutableArrayValueForKey: truth or dare

2010-06-17 Thread Roland King
On 18-Jun-2010, at 6:06 AM, Ken Thomases wrote: > >>> - in particular, that if you don't >>> also implement -countOfItems, -objectInItemsAtIndex:, >>> -insertObject:inItemsAtIndex:, and -removeObjectFromItemsAtIndex:, >>> then every change in the mutable array through the proxy replaces the whol

Re: mutableArrayValueForKey: truth or dare

2010-06-17 Thread Ken Thomases
On Jun 17, 2010, at 12:10 PM, Mike Abdullah wrote: > On 17 Jun 2010, at 17:47, Matt Neuburg wrote: > >> There is an assertion often encountered in people's blogs, answers to >> questions on forums, etc., that the proxy object provided by >> mutableArrayValueForKey: is inefficient > > This is wro

Re: mutableArrayValueForKey: truth or dare

2010-06-17 Thread Mike Abdullah
On 17 Jun 2010, at 17:47, Matt Neuburg wrote: > There is an assertion often encountered in people's blogs, answers to > questions on forums, etc., that the proxy object provided by > mutableArrayValueForKey: is inefficient This is wrong. The proxy only occurs a slight performance penalty over di

mutableArrayValueForKey: truth or dare

2010-06-17 Thread Matt Neuburg
There is an assertion often encountered in people's blogs, answers to questions on forums, etc., that the proxy object provided by mutableArrayValueForKey: is inefficient - in particular, that if you don't also implement -countOfItems, -objectInItemsAtIndex:, -insertObject:inItemsAtIndex:, and -rem