Re: Radio Buttons in NSTableView
Re: Radio Buttons in NSTableView
- Subject: Re: Radio Buttons in NSTableView
- From: Keary Suska <email@hidden>
- Date: Sat, 16 Jun 2007 11:45:41 -0600
- Thread-topic: Radio Buttons in NSTableView
on 6/15/07 4:25 PM, email@hidden purportedly said:
> I got an NSTableView that is populated by an NSArrayController.
> I want the first column to be displayed as a radio button and only one
> item should be selectable in this column (real radio button behavior).
> So I changed the class of the first column to NSButtonCell and its
> type to NSRadioButton. However, I can now still select multiple items
> in the first column and so multiple radio buttons are checked. Is
> there an easy way to achieve true Radio-Button behavior in a column in
> a NSTableView (I tried embedding the NSButtonCell in an NSMatrix but
> that did not work). Thx for your help in advance!
There is nothing built-in, so to speak, that will perform the behavior that
you want. There may be some third-party frameworks somewhere, but I don't
know of any.
Generally, I would say this behavior is more a function of the controller or
model object, and would be easier to implement there. Personally, I would
use notifications to announce that the "radio" value has been set for an
element, which informs the controller to "deselect" the last selected item,
which it could maintain.
Best,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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