Unexplained (buggy?) behavior of drupal_process_states with checkboxes in Drupal 7

I have 3 checkboxes named A, B, C. My desired behavior is as follows: if, and only if, both A and B are unchecked, then C becomes checked. Inversely, if either A or B are checked, C becomes unchecked.

I originally had the following definition under '#states' for C:

'checked' => array(     ':input[name="A"]' => array('checked' => FALSE),     ':input[name="B"]' => array('checked' => FALSE), ) 

This works fine when both A and B start out as checked on the form, so C only becomes checked when I uncheck both A and B.

The problem is, this doesn’t work when e.g. only A starts out as checked. In that scenario, unchecking A does NOT trigger C to become checked.

So I tried the following, which DOES work when only one of A or B starts out as checked – but NOT if both are checked:

'checked' => array(     ':input[name="A"]' => array('!checked' => TRUE),     ':input[name="B"]' => array('!checked' => TRUE), ) 

I honestly don’t even understand how this is different from my original code above (and I haven’t found any documentation that would explain it), but my guess is that maybe '!checked' => TRUE matches an element that has not been explicitly checked the user (but its current state is unknown), while 'checked' => FALSE only matches something that was explicitly unchecked. And btw, how/why is 'checked' => FALSE different from 'unchecked' => TRUE, because the latter does NOT have the same effect in my testing?!

But anyway, after trying a bunch of different things, I came up with the following – which still works when only A starts out as checked:

'checked' => array(     ':input[name="A"]' => array('checked' => FALSE),     ':input[name="B"]' => array('checked' => FALSE),     ':input[name="A"]' => array('!checked' => TRUE),     ':input[name="B"]' => array('!checked' => TRUE), ) 

BUT – this still does NOT work when both A and B start out as checked. In that scenario, unchecking either A or B still triggers C to become checked. And here’s the big question: HOW CAN ADDING CONDITIONS TO AN AND CLAUSE TRIGGER AN EVENT THAT IS NOT TRIGGERED BY A SUBSET OF THOSE CONDITIONS?!? In other words, if I comment out conditions 3 and 4 above, the code works when A and B start out checked: C doesn’t become checked until I uncheck both A and B. But as I said above, with lines 3 and 4 added, it only takes unchecking A OR B to trigger C to become checked, which is NOT what I want!!

So my actual question is twofold: how/why does this happen with 2 of the 4 conditions, and of course, how can I achieve the desired effect, as stated in my first paragraph?

Canon M50 Firmware buggy?

I upgraded to the Canon M50 firmware 1.0.2 two weeks ago.

Since yesterday, here are what challenges I’m facing:

  • Can’t switch from Manual or any other mode to Video mode.
  • Video mode is activated only when mode dial is set to Video before flipping power on
  • Other than main start/stop recording button on top, no other button works, literally. Pressing any of the buttons does not work. Only on/off and shutter/start/record buttons work. Thus, I can’t even get to menu to go settings and reset the device

Recording and picture taking also are locked at the last set settings I used, because I can’t change anything.

Screentouch doesn’t work. Buttons don’t work. Camera almost like a brick point and shoot camera.

I am hoping to downgrade to the 1.0.1 and see if there’ll be any difference. Except, I can’t even get to the Menu to apply the firmware.

Is this something of a software bug? Or is it hardware related?

Camera hasn’t fallen or hit anything.

Will appreciate any hints or workarounds.

Mission control and Dock are buggy

Both my Mission Control and Dock are not working properly.

My Dock does not seem to recognize my mouse moving horizontally along the Dock, ie. magnification does not move and when magnification is turned off, the tooltip does not move.

Mission control opens with a gesture, but hovering over the names of desktops/fullscreen windows does not expand the top bar to show previews like normal, and clicking them does nothing but escape Mission Control.

I have tried restarting and even wiping preferences for dock/mission control using defaults delete com.apple.dock; killall Dock. This did not fix my issue.

If it matters, this issue along with general unresponsiveness had been happening and I reset PRAM and SMC. This fixed the general unresponsiveness and my menu bar, which was also not working, but did not fix this issue.