Cabbage Logo
Back to Cabbage Site

Sending hrange values

Sending hrange values to one of its channels using cabbageSetValue doesn’t seem to work. In this example, the first slider should move both the second slider and one of the channels of the hrange, but the hrange doesn’t respond.
I don’t see hrange or vrange in the manual under widgets, has it been deprecated/forgotten?


hrangeTest.csd (708 Bytes)

Thanks Iain. I’ll fix this, I think I know there the problem is.

Ha, maybe I’m hoping people will forget about them because they’ve always been a pain to work develop. :rofl:

So this one isn’t so straightforward. The problem is that although there are two channels associated with a range slider, it’s still one component. And the unique name attached to that component is the first channel that is passed. So only changes sent to this channel will cause any updates. But cabbageSetValue won’t work because there are two values. Yeah, I painted myself into a corner here. You used to be able to set the values using minValue, and maxValue in the old system. For now I have reinstated that with the new system. New build available shortly. So you can now do something like this:

cabbageSet kTrig, "R1", "minValue", kS1  
cabbageSet kTrig, "R1", "maxValue", kS2

There is also inconsistency in that cabbageGetValue works fine for both values. I’ll see if I can’t patch this up to be a little more consistent. In the meantime, I’m afraid it’s the solution above. FWIW, that solution should continue to work regardless of future updates.

Thanks, again. That seems to do the trick.