Toggle question

I’m trying to control the state of two checkbox buttons with another. Basically, I’d like to make sure that when a single checkbox is clicked, if it’s going to enabled, that it does nothing to the two other buttons, but if it’s going to disabled, then I want it to set the state of the other two checkboxes to 0. What I’m having trouble with, I guess, is getting the state of the button in a self-referential way during on clicked. Here’s what I have:

on clicked theObject
if the name of theObject is "rtc" then
		if the state of theObject is 1 then
			set state of button "csf" of theObject's super view to 0
			set state of button "dcc" of theObject's super view to 0
		else
			--do nothing
		end if
	end if
end clicked

This isn’t working for me, and I’m guessing it’s because I don’t know how to get the state of theObject while it’s being clicked?

on clicked theObject
if the name of theObject is "rtc" then
		 if the state of button theObject is true then
			  set state of button "csf" of theObject's super view to false
			  set state of button "dcc" of theObject's super view to false
		 else
			  --do nothing
		 end if
	end if
end clicked

That work?

:frowning: No, it doesn’t work. I had already tried that before posting. Thank you though.

I’ve always used content, never knowing if it was actually the proper syntax.

Holy Crap, I can’t believe this didn’t occur to me, it should have been as plain as the nose on my face. My gosh, thanks so much for pointing this out!