NSMatrix Content Binding
NSMatrix Content Binding
- Subject: NSMatrix Content Binding
- From: Seth Willits <email@hidden>
- Date: Sun, 13 Apr 2008 19:57:54 -0700
Howdy,
I have a matrix of radio buttons that I'm trying to bind-ify. The two
options in the matrix should shown with the titles:
Mac OS Extended
Mac OS Extended Journaled
The *values* of these two items should be:
HFS+
Journaled HFS+
Then what I'd like to do is bind the selectedValue of the matrix
(which would be either "HFS+" or "Journaled HFS+") to a string
property in my model.
I can bind the content of the matrix to my model's "diskImageFormats"
key path which would be:
- (NSArray *)diskImageFormats;
{
return [NSArray arrayWithObjects:@"Mac OS Extended", @"Mac OS
Extended (Journaled)", nil];
}
...and that properly sets the titles of the two buttons, but the
values are still the titles. So I *thought* could simply bind
contentValues to another key path such as:
- (NSArray *)diskImageFormatValues;
{
return [NSArray arrayWithObjects:@"HFS+", @"Journaled HFS+", nil];
}
...but this doesn't work, because apparently the key path of
contentValues must have the content key path as a prefix, such as
"diskImageFormat.value" which entails a certain organization that
seems to be too far off from what I need.
Is there a way to do what I want to do?
--
Seth Willits
_______________________________________________
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