Using bindings with an NSArray of NSStrings ?
Using bindings with an NSArray of NSStrings ?
- Subject: Using bindings with an NSArray of NSStrings ?
- From: Bjoern Kriews <email@hidden>
- Date: Tue, 16 Mar 2004 21:10:08 +0100
I have an NSArrayController whose Object Class is set to "NSString".
Its content is set to an NSArray in awakeFromNib.
A NSTableView has one column that is bound to
ArrayController.arrangedObjects
with no model key path given in IB.
This (I admit to a little surprise) works fine.
When I try to bind a NSTextFields value to ArrayController.selection
to display the selection I get a crash:
2004-03-16 20:47:21.527 TableDrag[3673] *** -[_NSControllerObjectProxy
copyWithZone:]: selector not recognized
I suppose this comes from the cell trying to copy the (supposedly)
NSString but the NSControllerObjectProxy
not expecting this.
I have come across a few occasions where parts of my model are so
simple that I'd like to use just
NSArrays of NSStrings. As far as I know now, I have to resort to making
them into dictionaries
with one key each.
Is there an elegant way to solve this (getting away without the
dictionaries ?)
(Right now I am teching Cocoa to a group of interested coworkers and
I'd like to keep my examples
as simple as possible)
Thanks, Bjoern
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.