> On 8 Apr 2016, at 5:36 AM, Nivek Research <nivek.resea...@gmail.com> wrote: > > I have a number of NSMatrix instances that group radio buttons. Most bind the > selectedIndex or selectedTag bindings available on NSMatrix to a numeric > value in a model object. The others bind the contentObjects and > selectedObject binding available on NSMatrix. As NSMatrix is informally > deprecated in OS X 10.8 and later does anyone know a way to bind multiple > NSRadioButtons to a single numeric value as was once done with selectedIndex > or selectedTag such that the selected radio button follows the numeric value? > Similarly does anyone have a way to bind multiple buttons to a single object > value like NSMatrix’s selectedObject was used previously? Ideally any > solution should be backwards compatible to OS X 10.6 as I still need to > support that release. I have searched the internet though I have not seen a > solution that will work without major changes to my model code. Not that I am > not willing to make the changes. I just wonder if anyone has been enlightened > with a cooler solution.
If you have a bunch of “naked” radio buttons, all having the same target and selector (but presumably different tags, so you can distinguish them), they will automatically act as a group. This behaviour came in at some point in the mid OS X era, say 10.5/10.6, so isn’t universal, but it’s less bother than messing about with NSMatrix. If you need to set one programatically, just keep outlets to the individual buttons. —Graham _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com