I have a user input in app settings with choices of inputs (string / number / float etc)
When user changes from string to number, (but didn't actually change the string to a number (there's another input for this) I will default it (internally in the app) to a float. Is there a way to update this float into the user settings?
eg:
In App Settings;
Select Options
Opt1 (string)
opt2 (float)
opt3 (number)
enter min:
100 {default. this is a string)
within the app, I use app.getproperty to get the value
app.getProperty("ALERT_RNG_MIN"),
when it comes back as a string, but the user actually selected opt2 (float) but neglected to change the value to say 1.0 I will do it internally within the app
if (ALERT_RNG_MIN.toNumber() > 1 {
ALERT_RNG_MIN.toNumber = 1.0;
Is there a way to update the value within app settings to reflect the 1.0 instead of 100?
I tried
app.setProperty(ALERT_RNG_MIN , 1.0 );
but it didn't work citing ALERT_RNG_MIN as not found. (ALERT_RNG_MIN is defined as part of properties.xml)
Thanks