Label lambda onTextChange() is really onTextEdited

This may be too late to fix… but there should be two lambdas to match the Listener callbacks…

Label::textWasEdited() and Label::textWasChanged()

Label::textWasEdited() calls the lambda onTextChange() and there’s no way to detect textWasChanged using a lambda.

Rail

textWasChanged() and textWasEdited() are virtual methods that can be overridden by subclasses of Label. The listener methods (which the lambda callbacks match) are only for text change, editor shown and editor hidden.

It should be fairly simple to do your own text change check in the class that is listening to the onTextChange callback by just storing the label text in a local variable and checking if it is different in onTextChange.

Yeah, I tried that… but I only get those callbacks after the TextEditor is dismissed… so they seem to be doing the same thing… I’m trying to filter the TextEditor text in real time to avoid the user being able to enter two decimal points for instance in a tempo value string. To do that I had to override TextEditor::textEditorTextChanged() in my TempoLabel class… but I would have thought that would propagate through textWasChanged().

Cheers,

Rail