It seems user forced to press ENTER in Slider’s Label before clicking on dialog’s OK button. Otherwise chenges in Label doesn’t apply. How to get latest user changes from Slider’s Label (when user clicks dialog’s Ok button)?
class Slider_labelcentric :
public JUCE::Slider
{
typedef JUCE::Slider parent;
public:
Slider_labelcentric(JUCE::String const& componentName)
: parent(componentName)
{
}
JUCE::String get_label_current_value(void)
{
return valueBox->getText();
}
void update_value_from_label(void)
{
textChange(true, false);
}
protected:
void textEditorTextChanged(TextEditor& editor)
{
textChange(true, false);
}
};
In my OnOk handler I call update_value_from_label, but it doesn’t help because valueBox->getText() returns old value.