Re: Bindings, a Tableview and an array (Newbie question)
Re: Bindings, a Tableview and an array (Newbie question)
- Subject: Re: Bindings, a Tableview and an array (Newbie question)
- From: Mike Abdullah <email@hidden>
- Date: Sat, 6 May 2006 19:56:23 +0100
Oops, my bad. I somehow failed to read the bit about needing to edit
the strings as well :(
Mike.
On 6 May 2006, at 18:28PM0, mmalcolm crawford wrote:
On May 6, 2006, at 4:45 AM, Mike Abdullah wrote:
So you have an array of strings that you want to appear in your
table. OK, so:
1. Create an NSArrayController in your Nib
2. Bind the contentArray of this NSArrayController to the object
containing the array, making the key the accessor for the array
(Something like this)
bind to: myObject
key path: myStringsArray
3. Now select the column you want the text to appear in and bind
it to your array controller.
No, this doesn't work...
On 6 May 2006, at 01:19AM0, Nik Youdale wrote:
I have just started to play around with bindings and want to do
something relatively simple. I want to have a tableview that is
bound to an array of strings, so that in this tableview i can
view the contents of the array (strings) and also edit the
contents of the array.
[...]
I am able to get the array displayed in the tableview with no
problems using an NSObjectController and an NSArrayController and
binding the array controller to the value thing of the table
column. But I can not get it to edit the strings in the array.
... because NSString isn't KVC compliant...
You must use an array of objects that contain the strings (most
easily, dictionaries).
mmalc
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden