This doesn’t work as expected:
if aCheckbox's state is 1 then
display alert "checked"
else
display alert "not checked"
end if
But this does:
if aCheckbox's state as integer is 1 then
display alert "checked"
else
display alert "not checked"
end if
Why the need to cast NSInteger?
And on a related note, what is the correct way to use the NSCellStateValue enum instead of hardcoded values?