Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

butteryak

macrumors newbie
Original poster
May 12, 2011
4
0
I'm getting this error when trying to change the title of a button, and Im not sure what I'm missing....
Can’t set «class butT» "off" of window "window" to "on". (-10006)

this works to change the button from on to off when clicked.....
if title of theObject = "on" then
set title of button "on" of window "window" to "off"
end if



but adding an else statement to change it back results in the error


if title of theObject = "on" then
set title of button "on" of window "window" to "off"


else if title of theObject = "off" then
set title of button "off" of window "window" to "on"
end if



any thoughts?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.