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
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 mails | Author | Date |
|---|---|---|
| Paul Szego | Apr 3, 00:47 | |
| mmalcolm crawford | Apr 3, 03:53 | |
| Paul Szego | Apr 3, 11:31 | |
| mmalcolm crawford | Apr 3, 11:51 | |
| mmalcolm crawford | Apr 3, 11:55 | |
| Paul Szego | Apr 4, 22:13 |






Cocoa mail archive

