Checkbox state

I see its’ been addressed many times before but I don’t seem to get what I need…

I’ve got a checkbox and am able to save the state between launches of the application, but can’t read the state into a variable since the binding is now ‘shared defaults controller’.

So the box state is saved, but how, in code, do I retrieve the state in my script? I hope this is an easy one; thanks for the help everyone. I can find the state if the user checks the box by linking it to a subroutine, but if the user doesn’t touch the checkbox, how do I find out what it is set to?
thx

Hi,

just call NSUserDefaults for the value


set theCheckBoxState to current application's NSUserDefaults's standardUserDefaults()'s boolForKey_("myCheckBoxStateKey")

if you need also the mixed state, you have to retrieve the integer value instead of the boolean value

I think that was the code I needed! Thank you!