Re: Bindings and 2 NSTableViews
Re: Bindings and 2 NSTableViews
- Subject: Re: Bindings and 2 NSTableViews
- From: Joakim Danielson <email@hidden>
- Date: Mon, 10 Jan 2005 00:30:36 +0100
Im pretty new to bindings so forgive me if this is really simple, but
i have not found an answer anywhere yet.
I have 4 classes:
BSObject
-> NSString* title
BSCollection
->NSMutableArray* objects
BSCategory
->NSString* name
-> BSCollection* collection
BSCategoryList
->NSMUtableArray* categories
I want to bind a BSCategoryList with a NSTableView. That works fine. I
use an NSArrayController and set its contentArray to
BSCategoryList.categories. When an item in that NSTableView is
selected, i want another NSTableView to show the contents of the
selected BSCategory. So, i set the binding for my column to my
NSArrayController - selected - collection.title. Am i doing this
right? Its not working on my side. Can anyone help me out here, maybe
there's a tutorial on this somewhere.
You have to use a second NSArrayController and bind it to the first
controller with with "selection" as the controller key and
collection.objects as the content array.
Joakim
ANy help appreciated, thanks
Alex
_______________________________________________
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
_______________________________________________
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