G’day once more scriptures.
Writing once again in frustration.
I’ve created the group of three radio buttons, but individually, not as a matrix.
The Tool Tips for the radio buttons now says…
For a single choice among mutually-exclusive options.
For apps running on 10.8 and later, creating radio groups with individual NSButton objects (rather than an NSMatrix) is preferred.
Radio buttons automatically act as a group (selecting one button will unselect all other related buttons) when they have the same superview and -action method.
So, I did, but even thought I’m using the same handler to switch the buttons (and it works), I cannot work out how to get the set values for whichever of the three is set.
Binding the first one to a matrix property does not work. And Shanes Explored does not seem to cover this updated requirement.
If I have to resort to using a matrix, how can I convert a single button instance to a matrix of three buttons?
ATM I’ve tried binding each button to a property, but clicking any button always responds as thought the first button is clicked.
on resetTextLineReplace:sender try # No matter which button is clicked, the response is always 'replace' if sender is radioSelectButtonOne then set my textLineReplace to "replace" if sender is radioSelectButtonTwo then set my textLineReplace to "before" if sender is radioSelectButtonThree then set my textLineReplace to "after" on error errmsg number errnum my thereHasBeenAnError("resetTextLineReplace", errmsg, errnum, 0, 0) end try say textLineReplace as text my fordEvent() end resetTextLineReplace:
|