Hi, I’m trying to adjust some of the NumericStepper component behaviour and got two questions about it.
First, I’d like to retrieve the text input of it before the value is set so I can use some parsing on it (like receiveing “10 + 20” and setting the numeric stepper value to 30. By checking the API I elieved I could use the “valueParseFunction” property for this, like:
var st:NumericStepper = new NumericStepper();
st.valueParseFunction = this.numericParser;
-------
private function numericParser(txt:String):Float {
trace ('expression got', txt);
return (Std.parseFloat(txt));
}
I tried this but I believe the “numericParser” is not being called (no trace output). Is this possible?
Second, is it possible to have the “+” and “-” continuously increasing/decreasig the value while on mouse down?
You are using the correct API! However, I just discovered that there was a bug. It was incorrectly checking whether valueFormatFunction is null before trying to call valueParseFunction. Obviously, it should have been checking whether valueParseFunction is null instead.
The fix is available on GitHub, and it will be included in the next release.
It is not currently possible. The older AS3/Starling version of Feathers UI supported this feature, but I guess I never got around to porting it to the Haxe/OpenFL version. I just opened a feature request, and I’ll try to get it implemented in a future update.