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 12:45:45 +0100
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.
To help you get started, I found this tutorial rather helpful
http://cocoadevcentral.com/articles/000080.php
Mike.
On 6 May 2006, at 01:19AM0, Nik Youdale wrote:
Hi,
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.
Is there a tutorial or some simple steps i can take to achieve this
sort of thing with bindings? (I can do it with the delegate methods
of a tableView, but that requires a lot of code).
Cheers
Nik
_______________________________________________
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