GP not sending widget CC when changing rackspaces

Oh wow! Im building dangerous machines and I don’t even know it! LOL

I must say, it definitely didn’t look right to me just sticking the ForceWidgetUpdate(KNOB1) in there like that, but it complied… but its “shooting blanks”. LOL

so…like this?

var
   KNOB1, KNOB2 : Widget

Function ForceWidgetUpdate(w : Widget)

var
   v_value : double = w.GetWidgetValue()
   v_tick : double =  if v_value == 1.0 then -0.01 else 0.01 end
   
  w.SetWidgetValue(v_value + v_tick)
  w.SetWidgetValue(v_value - v_tick)   
End

On Activate
   ForceWidgetUpdate(KNOB1)
   ForceWidgetUpdate(KNOB2) 
  end

Seems to be working… :slight_smile:

Thank you @pianopaul and @dhj !!!

1 Like

For even more safety, declare the function before you declare the widgets (see below). That way the code would NOT have compiled had you included a reference to KNOB1 inside the function


Function ForceWidgetUpdate(w : Widget)
var
   v_value : double = w.GetWidgetValue()
   v_tick : double =  if v_value == 1.0 then -0.01 else 0.01 end
   
  w.SetWidgetValue(v_value + v_tick)
  w.SetWidgetValue(v_value - v_tick)   
End


var
   KNOB1, KNOB2 : Widget

On Activate
   ForceWidgetUpdate(KNOB1)
   ForceWidgetUpdate(KNOB2) 
  end

[/quote]

2 Likes

Thank you!