FROM : mmalcolm crawford
DATE : Fri Nov 26 20:41:15 2004
On Nov 26, 2004, at 9:14 AM, Todd Freese wrote:
> I have an NSTableView bound using an NSArrayController to a single
> NSMutableArray of NSStrings. The NSTableView displays the array and
> allows the cells to be edited. However, when you exit the cell, the
> changes disappear and do not update the array.
>
Unfortunately, dealing with an array of strings is not as
straightforward as it might be. If they are actually NSStrings, then
they're immutable. KVC will try to change their value in situ, not
replace the object, and this obviously won't work...
See for example,
<http://www.cocoabuilder.com/archive/message/cocoa/2004/7/10/111440>,
<http://www.cocoabuilder.com/archive/message/cocoa/2004/3/19/102078>.
If you can replace your strings with dictionaries, life will be
easier...
mmalc
DATE : Fri Nov 26 20:41:15 2004
On Nov 26, 2004, at 9:14 AM, Todd Freese wrote:
> I have an NSTableView bound using an NSArrayController to a single
> NSMutableArray of NSStrings. The NSTableView displays the array and
> allows the cells to be edited. However, when you exit the cell, the
> changes disappear and do not update the array.
>
Unfortunately, dealing with an array of strings is not as
straightforward as it might be. If they are actually NSStrings, then
they're immutable. KVC will try to change their value in situ, not
replace the object, and this obviously won't work...
See for example,
<http://www.cocoabuilder.com/archive/message/cocoa/2004/7/10/111440>,
<http://www.cocoabuilder.com/archive/message/cocoa/2004/3/19/102078>.
If you can replace your strings with dictionaries, life will be
easier...
mmalc
| Related mails | Author | Date |
|---|---|---|
| Todd Freese | Nov 26, 18:14 | |
| mmalcolm crawford | Nov 26, 20:41 |






Cocoa mail archive

