Forum Discussion
Can I prevent "NaN" from appearing in numerical entry?
Simon -- yep, thanks, I get that for cases where treating numbers as text is sufficient. The problem is that in many common use cases (as you mentioned earlier in the thread), there's a need to be able to process numeric entries as numbers --- ie, use numeric operators in the condition expressions for things like range checking, or to any kind of calculation. These operations require the use of numeric variables --- then we're back to the NaN display issue.
If there was simply a way in the conditions menus to check for "NaN" as the current "value" of a numeric variable, then we could replace NaN with something useful and understandable by all users (such as setting it to a proper numerical reset value and/or displaying "please enter a number" as feedback in an adjacent textbox for example.
Some solution for this is fairly essential, imo, for getting basic usability in place when numeric entries are involved. I suppose if there's no direct workaround in SL itself, javascript could be used to check that variable for the "NaN" condition and then set other variables as needed for feedback or value reset.
Related Content
- 2 months ago
- 2 years ago
- 4 months ago
- 11 months ago