I have an NSMatrix in my code, specifically radio buttons. I would like to create a delegate to post a message when the radio button selection is changed.
Which delegate do I have to use? I have tried the textDidChange Method without any success.. obviously, I have used the [radioButtons setDelegate:self] at the initialization stage of the application.
Thanks
NSMatrixis a subclass ofNSControl, so you can use the same target-action paradigm as with any otherNSControlsuch as a push button.You can set the target and action on the
NSMatrixusing interface builder (control drag from the matrix to a class) or in code withsetTarget:andsetAction:. Then, when a cell in the matrix (here, a radio button) is selected, the action method is called, and you can query which radio button was selected with theselectedCellmethod.See https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Button/Articles/QueryMatrixButtons.html