Binding to NSArrayController selection
Binding to NSArrayController selection
- Subject: Binding to NSArrayController selection
- From: Greg Best <email@hidden>
- Date: Wed, 24 Oct 2007 00:00:13 -0700
I've built a custom view that I'm trying to make a little more IB
friendly. I've built it into an IBPalette, and now I'm trying to
make it a little more friendly to bindings.
The view generates data plots. It can display multiple data sets
simultaneously, and maintains an NSMutableArray of data set objects.
Each data set maintains an NSMutableArray of data points. I've
successfully bound an NSArrayController to the array of data sets,
and I'll deal with the data points later.
When I click on a data set, the view recognizes the data set being
selected and highlights it. Multiple data sets can be selected
simultaneously. The selection is maintained by the view and an
NSMutableArray containing the selected sets (in no particular order).
How do I get the controller to recognize my selection so I could,
say, list the data sets in a table and highlight those selected, or
modify properties of the selected sets? I'm trying to avoid making
the view aware of the controller because I don't want to force an
application to use one, which is why I'd like to do this through
bindings rather than calling the methods on the controller directly.
Thanks for any help. If I need to make the structure more clear,
please ask.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden