Bugs with some style of slider

hi !

i think there is a bug with the jucer
when you create a slider with a style like two or three value horizontal or vertical -> they all become linear horizontal

thanks to julian for these great tools :smiley:

I used the 2/3 value styles for sliders in the juce demo app, and they work fine. Could you post a snippet of the code you’re using that makes it go wrong?

take the last version of the jucer 1.6
create a component with a slider with a style 2/3 values
-> the generated code is horizontal single value slider

i have try on windows XP and 2000

i’m agree if you code it directly it works but i work a lot with the jucer

oh right, I see. Not a big deal, it just looks like I forgot to add the new styles to jucer_SliderHandler.h:

static const String sliderStyleToString (Slider::SliderStyle style)
switch (style)
case Slider::LinearHorizontal:
return T(“LinearHorizontal”);
case Slider::LinearVertical:
return T(“LinearVertical”);
case Slider::LinearBar:
return T(“LinearBar”);
case Slider::Rotary:
return T(“Rotary”);
case Slider::RotaryHorizontalDrag:
return T(“RotaryHorizontalDrag”);
case Slider::RotaryVerticalDrag:
return T(“RotaryVerticalDrag”);
case Slider::IncDecButtons:
return T(“IncDecButtons”);
case Slider::TwoValueHorizontal:
return T(“TwoValueHoriz”);
case Slider::TwoValueVertical:
return T(“TwoValueVert”);
case Slider::ThreeValueHorizontal:
return T(“ThreeValueHoriz”);
case Slider::ThreeValueVertical:
return T(“ThreeValueVert”);


    return String::empty;

static Slider::SliderStyle sliderStringToStyle (const String& s)
    if (s == T("LinearHorizontal"))
        return Slider::LinearHorizontal;
    else if (s == T("LinearVertical"))
        return Slider::LinearVertical;
    else if (s == T("LinearBar"))
        return Slider::LinearBar;
    else if (s == T("Rotary"))
        return Slider::Rotary;
    else if (s == T("RotaryHorizontalDrag"))
        return Slider::RotaryHorizontalDrag;
    else if (s == T("RotaryVerticalDrag"))
        return Slider::RotaryVerticalDrag;
    else if (s == T("IncDecButtons"))
        return Slider::IncDecButtons;
    else if (s == T("TwoValueHoriz"))
        return Slider::TwoValueHorizontal;
    else if (s == T("TwoValueVert"))
        return Slider::TwoValueVertical;
    else if (s == T("ThreeValueHoriz"))
        return Slider::ThreeValueHorizontal;
    else if (s == T("ThreeValueVert"))
        return Slider::ThreeValueVertical;

    return Slider::LinearHorizontal;

woah, when did those puppies appear? :smiley: that’s great, i was about to recode a range-slider for handxl, but that’s just saved me a whacking great load of effort. cheers jules!

thanks jules !
i work with juce since two weeks to make me some custom controllers for hardware synth and it is really great :wink: