A double is big enough to store that value with no problem. If it's going wrong, it must be because it's getting truncated to an integer somewhere. If you can point to somewhere in the code that needs changing, I'd be happy to take a look!
You are right. The problem seems to be in the lable display. When trying to diplay the label, the value is converted into a String and it shows up as -1 in the UI.
Here is a simple project created from Introjucer that shows this.
http://www.filedropper.com/slidermaxmintest
A screenshot with the stack trace http://postimg.org/image/3uem07umn/
and this roundToInt function is implemented in juce_MathFunctions.h as follows (including only the relevant lines of code:
and this roundToInt function is implemented in juce_MathFunctions.h as follows (including only the relevant lines of code:
template <typename FloatType>
inline int roundToInt (const FloatType value) noexcept
{
union { int asInt[2]; double asDouble; } n;
n.asDouble = ((double) value) + 6755399441055744.0;
#if JUCE_BIG_ENDIAN
return n.asInt [1];
#else
return n.asInt [0];
#endif
}
So you see it's truncated to an int right there.
What you could do to fix this from the app side is: derive from Slider, and reimplement getTextFromValue() for example like this: