Re: Newbie needs help with tableview and bindings
Re: Newbie needs help with tableview and bindings
- Subject: Re: Newbie needs help with tableview and bindings
- From: Steve Gran <email@hidden>
- Date: Thu, 24 Nov 2005 12:52:57 -0800
The light is beginning to shine in.
Thanks Wain, I got it now and more importantly it works!!! Nothing
like learning to program while the turkey is cooking.
:)
Thanks again,
Steve
>> But how do I get to load the tableview with an array containing 10
>> items without the use of an "Add item" button (action). I'm really
>> hoping someone can provide a real step by step guide since I'm such
>> a beginner.
>>
>> Thanks,
>>
>> Steve
>>
>> You can accomplish this by setting up your table view in Interface
>> Builder to show 3 column by 10 rows and turn off showing the
vertical
>> scrollers. Eventhough the table view can display more than 10
items,
>> you will control it by not allowing it to scroll thus limiting the
>> display of 10 items
>I will assume that you have completed up to here...
>> and by making sure that only 10 items are in the
>> content array that your NSArrayController uses.
>and that this is the section you don't follow...
>Note that I don't have a copy of the book so I am making assumptions:
>I'm guessing you have some object which is the owner of the interface
>builder (nib) file - "File's Owner",
>hopefully this object has access to the data you want to display,
>this data should be placed into an NSArray (or NSSet) which we'll
>call dataArray
>in interface builder go to the 'Bindings' info pane for your
>NSArrayController which is supplying data to the table view
>connect, or more rightly, bind the 'contentArray' or 'contentSet'
>binding to "File's Owner (Owner name)" with model key path "dataArray"
>Hope this is clear enough...
>Wain
_______________________________________________
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