Prevent calling widget value change on activation?

My apologies if this is already been covered, but I cant seem to find anything by searching.

It seems like " On WidgetValueChanged " is called when changing rackspaces from a rack where the same widget was in an opposite state. Is there anyway to prevent this when activating a new rack?

For example 1st button on Xtouch is off on rack 1. Switch to rack 2 and the button is saved to “on” so it changes to on when rack 2 is selected after rack 1. That seems to triggerl the “On WidgetValueChanged”

Thanks
Rob

It sounds like normal behaviour to me.

In terms of ways to deal with the first callback on rackspace activation, I had thought maybe a simple variable in the “On Activate” callback could be used to set a flag that the rackspace had just activated (so the next WidgetValueChanged callback could use this flag and ignore any further action).

However it looks like the “On WidgetValueChanged” callback is commonly called before the “On Activate”, so this approach doesn’t work.

As explained by @rank13 all the On WidgetValueChamged callbacks are called when entering a rackspace independently of the widget value. When I discovered this I also wanted to prevent it, but now I think it is important because it gives you the opportunity to get the hand at least once on each callback to “initialize” some behaviors.

Furthermore all the widgets and associated callbacks are different entities from one rackspace to the other even they are similarly assigned to the same external MIDI controller.