Hey guys,
I’m having trouble checking which button out of two radios in a cell matrix are checked.
In the code below, the log prints out:
2008-09-29 11:49:47.440 Imaging Automator[4087:10b] "Not working."
2008-09-29 11:49:47.442 Imaging Automator[4087:10b] "connectedDrive on state"
which means that since it’s else, it’s not working correctly, but yet it still logs the name of the cell and it’s state correctly!
What’s going on?
if state of button "timeMachine" of tab view item "optionsTab" of tab view "tabView" of window "mainWindow" is 1 then
set connectedDrive to (state of cell "connectedDrive" of matrix "timemachineSource" of tab view item "optionsTab" of tab view of window "mainWindow")
set timeCapsule to (state of cell "timeCapsule" of matrix "timemachineSource" of tab view item "optionsTab" of tab view of window "mainWindow")
if connectedDrive is on state then
log name of current cell of matrix "timemachineSource" of tab view item "optionsTab" of tab view of window "mainWindow"
else if timeCapsule is on state then
log name of current cell of matrix "timemachineSource" of tab view item "optionsTab" of tab view of window "mainWindow"
else
log "Not working."
log (name of current cell of matrix "timemachineSource" of tab view item "optionsTab" of tab view of window "mainWindow" as string) & " " & (state of current cell of matrix "timemachineSource" of tab view item "optionsTab" of tab view of window "mainWindow" as string)
end if
end if