Slider skew factor and other things

would be gr8 to add slider skew factor selection as property…

ah just to notice, i’ve lost a lot of user code (the one that go in the sliderListener), by changing the name of the slider after it was set… when resaving the jucer file, the user code that i wrote desappeared ! ouch :confused:

yep, I’ll add that at some point.

I’ve also lost code by adding it to jucer files without thinking… It’s annoying, but just too hard to make it figure out which bits are user-code.

yeah skewFactor and enableUnboundedMovement could be gr8 to have in the jucer ( doing them manually atm… with hundreds of sliders ! a pain :confused: )

anyway about the user code, an example:

  1. put a slider in, then name this to XXX
  2. save the component to the cpp files
  3. modify manually the user code for slider XXX listener
  4. open up again the component in jucer…

does that assign the user code XXX to slider named XXX ?

yes cause if i save again the component, i do not loose the code.

but if i rename the slider, and save it, the user code desappears.
can’t that user code be reassigned to the same slider with the new name (only the name is changing afterall) ?
just to know…

ah sorry, I see what you mean now. Hmm. Tricky. The user code isn’t actually loaded when you open a jucer document - instead when you save, it first loads the orginal file, and copies across any bits of user code to the new version. So at that point it has no way of knowing what the slider was originally called.

Something I’m doing at the moment is adding a fixed ID for each component, so it could use that to label the user code sections. But of course if I change that, it’ll lose the code from any existing files that people have.

ah, i thought that when opening the file, it will scan for user code sections and assign them to every control they belong to… i was wrong !

never saw fluid editor for fltk ? (i know fltk SUCKS) it is a piece of crap but have only one good things in it: the ability to write user code directly inside it, with syntax higlight (so you have under control which pieces of code you have wrote before, without loosing them)…

The word is “lose”, not “loose”!!

Yes, adding an ability to edit code in the jucer would be good one day!

oops, my english is like poor and goose-egg :slight_smile:
anyway if only i can speak english like i’m speaking venetian dialect… eh !

oops, my english is like poor and goose-egg :slight_smile:
anyway if only i can speak english like i’m speaking venetian dialect… eh ![/quote]

Nah, theres plenty native english speakers manage to write “lose” as “loose” on the web. dunno what the fuck thats all about. its a jules irritant, i know that! lol

by the way instead of skew factor it could be great to specify the middle point and let the Slider choose the skew factor automatically.

I have code to do that somewhere on my HD if necessary

[quote=“mdsp”]by the way instead of skew factor it could be great to specify the middle point and let the Slider choose the skew factor automatically.

I have code to do that somewhere on my HD if necessary[/quote]

Yes, that’d be neat. Would love to see the code, as my maths abilities aren’t so hot!

as the mapping is done as followed

proportion = ((value-min)/(max-min))^skewFactor 

then by introducing value=mid mappped to proportion = 0.5 and taking the log it comes that

log(0.5) = skewFactor * ( (mid-min) / (max-min) )

and thus:

float skewFactor = log(0.5f) / log((mid-min)/(max-min));

Cool. Thanks for that, I’ll add it in there.