I have a checkbox whose referencing outlet is tied to an IBOutlet called missingValue and whose sent action outlet is tied to a function called enabledReadOnly. The function code is below:
on enabledReadOnly:sender --this action is only bound to the read only button
set readOnlyToggle to sender's integerValue
if sender's integerValue = 1 then --if we set it to read only, we clear all the other buttons and disable them
--again, this is how nagios does it in the web UI, so we shall here
log "enabled"
my canSeeAllObjects's setEnabled:false
my canSeeAllObjects's setState:0
my canReconfigureAllObjects's setEnabled:false
my canReconfigureAllObjects's setState:0
my canControlAllObjects's setEnabled:false
my canControlAllObjects's setState:0
my canSeeOrConfigureMonitoringEngine's setEnabled:false
my canSeeOrConfigureMonitoringEngine's setState:0
my canAccessAdvancedFeatures's setEnabled:false
my canAccessAdvancedFeatures's setState:0
else if sender's integerValue = 0 then --don't try to reset the state, just re-enable the other checkbox buttons
log "disabled"
end if
current application's NSLog("read only's integer value: %@", readOnlyToggle) --log the error message
end enabledReadOnly:
when i click the radio button from on to on off, i see a 1 or a zero in the log as appropriate, but it never hits either part of the if statement. I’ve also tried it with intValue and even “my readOnly’s intValue”, and nothing changes.
I’ve no idea what I’m missing here.