Re: Darn Radio button question
Re: Darn Radio button question
- Subject: Re: Darn Radio button question
- From: Brian Christmas <email@hidden>
- Date: Wed, 30 Mar 2016 17:50:21 +1100
Shane, thank you, that worked, as your suggestions usually do.
Now, another question related to the same radio buttons.
When restoring the settings from saved variable lists, I need to reset the radio buttons.
I’ve tried the following, using zeros and 1 as the settings, but the code crashes with ‘unrecognised selector sent to instance’.
I presume the method has changed for these too; do you have any recommendations as to what to try, please? (also, where do you find the updated information about these changes, googling hasn’t helped me).
Regards
Santa
on resetTextLineReplaceToggler:sender try if textLineReplace is "replace" then radioSelectButtonOne's selectCellAtRow:1 column:1 if textLineReplace is "before" then radioSelectButtonTwo's selectCellAtRow:1 column:1 if textLineReplace is "after" then radioSelectButtonThree's selectCellAtRow:1 column:1 on error errmsg display dialog errmsg end try end resetTextLineReplaceToggler:
On 29 Mar 2016, at 10:20 PM, Shane Stanley < email@hidden> wrote: On 29 Mar 2016, at 1:43 PM, Brian Christmas < email@hidden> wrote: I cannot work out how to get the set values for whichever of the three is set.
There's been a change of behavior when comparing two variables that point to the same object -- you can't rely on a simple AppleScript test for equality.
This works here:
on resetTextLineReplace:sender set textLineReplace to "" if sender's isEqualTo:radioSelectButtonOne then set textLineReplace to "replace" else if sender's isEqualTo:radioSelectButtonTwo then set textLineReplace to "before" else if sender's isEqualTo:radioSelectButtonThree then set textLineReplace to "after" end if display dialog textLineReplace end resetTextLineReplace:
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden