API: mOnTitleChange and mOnColorChange broken for some bindings

Interestingly, I stumbled upon a “workaround” for this yesterday. I have absolutely no clue why it works, but apparently, it does. My repro snippet can be changed like this:

  var surfaceValue = deviceDriver.mSurface.makeCustomValueVariable("surfaceValue");
  var mixerBankZone = page.mHostAccess.mMixConsole.makeMixerBankZone();
  var channel = mixerBankZone.makeMixerBankChannel();
  
  page.makeValueBinding(surfaceValue, channel.mValue.mVolume);
+ page.makeValueBinding(surfaceValue, channel.mValue.mVolume); // Yes, a duplicate binding :O

  surfaceValue.mOnColorChange = function () {
-   console.log("This is not logged when navigating the MixerBankZone.");
+   console.log("This is logged when navigating the MixerBankZone.");
  };
  surfaceValue.mOnTitleChange = function () {
-   console.log("This one neither.");
+   console.log("This one too.");
  };

:magic_wand: :sparkles:

4 Likes