Skip navigation.
 
mlRe: insertObject:in<Key>AtIndex: not being called.
FROM : mmalcolm crawford
DATE : Sun Apr 03 11:51:15 2005

On Apr 3, 2005, at 1:31 AM, Paul Szego wrote:
> Ok - so the bottom line seems to be: if you're wanting KVC write 
> access, you have to know whether you're dealing with a to-many 
> property. In that case, use mutableArrayValueForKeyPath: instead of 
> just setValue:forKey: to cater for the situation where indexed 
> accessors are provided.
>

Correct.

> Which leads to me next question about bindings, which I've posted 
> elsewhere. If I bind a to-many property that's providing indexed 
> accessors, the default bind: behaviour provided in NSObject tries 
> to call setValue:forKey: instead of using 
> mutableArrayValueForKeyPath:, and so I get a "not KVC compliant" 
> error message. Is this what should happen?


No -- assuming you're using an array controller?

mmalc

Related mailsAuthorDate
mlinsertObject:in<Key>AtIndex: not being called. Paul Szego Apr 3, 00:47
mlRe: insertObject:in<Key>AtIndex: not being called. mmalcolm crawford Apr 3, 03:53
mlRe: insertObject:in<Key>AtIndex: not being called. Paul Szego Apr 3, 11:31
mlRe: insertObject:in<Key>AtIndex: not being called. mmalcolm crawford Apr 3, 11:51
mlRe: insertObject:in<Key>AtIndex: not being called. mmalcolm crawford Apr 3, 11:55
mlRe: insertObject:in<Key>AtIndex: not being called. Paul Szego Apr 4, 22:13