I am building an UI which has 3 radio buttons.
- Button “Plus” should be highlighted when radio button “1” is selected.
- Text field “name” should be highlighted when radio button “2” is selected.
- Button “OK” should be highlighted when radio button “3” is selected.
----------Code-------------------------------------------------------------------------------------------------
on clicked theObject
tell window of the object
if name of theObject is “1” then
set first responder to button “Plus”
else if name of theObject is “New_sheet” then
set first responder to text field " name"
else if name of theObject is “New_book” then
set first responder to button "OK "
end if
end tell
end clicked
The error :
Applescript error: Can’t set «class butT» “Plus” to «class butT» “Plus” o (-10006)
However, the code works fine if I change to use push buttons rather than radio buttons.
Could anyone tell me what I am doing wrong?
Thanks a million!!!