I was using a TwoValue slider (Min/Max) and was using setRange(min, max)
Originally I was using
minimaxSlider->setRange(0.00, 1.0); // commented out minimaxSlider->setMaxValue(1.0, false); // Get around a feature, whereby min is validated against min & vice-verse minimaxSlider->setMinValue(0.0, false);
The assert triggered, so I commened out the setRange()
However, this now causes an assert here:
void Slider::setValue (double newValue,
const bool sendUpdateMessage,
const bool sendMessageSynchronously)
// for a two-value style slider, you should use the setMinValue() and setMaxValue()
// methods to set the two values.
jassert (style != TwoValueHorizontal && style != TwoValueVertical);
How else can I modify the minimum & maximum values?
As I said, I tried setMinValue and setMaxValue, but they don’t do the same thing (and don’t seem to actually adjust the minimum and maximum privates)
I think there may be an issue with limits and validations too…(hinted in comments above) I’m not sure I can change the min/max values as checks are done against the current values, and these prevent changes (not sure how to explain this, except that the new lower/upper limits are validated against the old upper limit and vice/verse - sometimes this gets in the way of setting the ranges required)
- That said, it’s been a long day, and perhaps I’m missing something obvious (i.e. I haven’t had a chance to sniff around the example demo code changes yet)