Bindings with an NSMatrix of NSButtons
Bindings with an NSMatrix of NSButtons
- Subject: Bindings with an NSMatrix of NSButtons
- From: Paul Bruneau <email@hidden>
- Date: Wed, 24 Oct 2007 11:40:25 -0400
I feel so stupid and frustrated because it seems like it takes me 2
days of headbanging and endless google searches, followed by a
message to this list every time I try a new type of Binding. It's
especially these ones with the "content" "contentObjects" and
"contentValues" that drive me crazy. The documentation just makes my
head spin.
I want to bind an array to an NSMatrix of checkboxes. When I click
one of the checkboxes, I want the corresponding object in the array
to get updated. I can bind a single int to a single checkbox no
problem, but I am totally stumped by NSMatrix Bindings. Am I supposed
to make an array of NSNumber objects?
The NSMatrix Bindings docs say:
content
An NSArrayController instance that provides the content of the
NSMatrix.
So that is what I'm using. I have "arrangedObjects [testController
(NSArrayController)]" bound. But then it says that binding is read
only, so I go ahead and set up a binding for:
contentObjects
An array of objects that are (sic) returned by selectedObject or
selectedObjects in place of the corresponding content object.
If content is not bound, the contentObjects binding is not available.
Here I start to go nuts. What does selectedObject have to do with it?
Does anyone have a sample or can describe how to do this binding? Or
am I totally missing the fact that this binding is not possible?
Thank you
_______________________________________________
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