Floating point values in resources
-
It's very limiting to me that I can only use whole number integers (ie. 1, 2, 50) for resources. It would be very useful to me and I'm sure a lot of others if it were possible to use floating point values there (ie. 1.5, 2.1, 50.68).
-
@daffie said in Floating point values in resources:
It's very limiting to me that I can only use whole number integers (ie. 1, 2, 50) for resources. It would be very useful to me and I'm sure a lot of others if it were possible to use floating point values there (ie. 1.5, 2.1, 50.68).
In the standard interface, you can use a resource with the "FixedString" type. Or use the web interface and create any input elements in it
-
Yea I later saw in the string actions that there's an action to convert a string to a number and that's what I ended up doing.
Although this still isn't quite the same since these fields without some additional validation could be prone to issues if any non numbers were to be entered into this field, I'm not sure how it would convert that but likely not the way it would normally be.
It also loses out on the ability to set a hard limit to the minimum and maximum value, sure this could be done again with additional validation but by the time an invaid value is noticed that window is already closed and it would need to be restarted or require prompting user to fix it and provide a new value.
And one final but maybe not as crucial but the spinbox field type like the one used for FixedIntegers which allows the value to be adjusted by clicking on the up/down arrows next to the field can be very nifty to have in certain situations.
-
@daffie said in Floating point values in resources:
Yea I later saw in the string actions that there's an action to convert a string to a number and that's what I ended up doing.
Although this still isn't quite the same since these fields without some additional validation could be prone to issues if any non numbers were to be entered into this field, I'm not sure how it would convert that but likely not the way it would normally be.
It also loses out on the ability to set a hard limit to the minimum and maximum value, sure this could be done again with additional validation but by the time an invaid value is noticed that window is already closed and it would need to be restarted or require prompting user to fix it and provide a new value.
And one final but maybe not as crucial but the spinbox field type like the one used for FixedIntegers which allows the value to be adjusted by clicking on the up/down arrows next to the field can be very nifty to have in certain situations.
I gave an example of how this can be implemented now, because the developer said that the standard interface will no longer be changed.