Open MaskedRetriever opened 14 years ago
Okay, more from the RR builder's blog:
its on XP and Vista home with Java6 - its the local setings with "," or "." as decimal separator ... the program is expecting "1.00" and the OS changes the "1.0" from config.txt into "1,00" in the GUI.
If i replace the "," in the GUI-screen by "." (really slow, 3 seconds for every interaction on a dualcore) its OK ...
Viktor
Okay first, what the HELL kind of OS uses commas for periods, I'll patch it this weekend if nobody else does, and second, where are three-second delays coming from-- anyone got a system that can reproduce this horribleness?
It's an internationalization thing - whole countries use "," instead of "." as decimal separators. Java should have these sorts of hooks, which Processing should be able to inherit. It's just a matter of figuring out how to do the string-to-number conversion instead of manual string parsing.
Wow, wild. The correct place for this then is in the actual number-figuring code, which I can tell to look for commas as well as periods...
... it's not this simple - if you equals commas and periods, then you'll get mismatching with values bigger thosand ... e.g. in German notation "2.320,4" is the same value as "2,320.4" in the states ;-)
So you have to search the right conversion-routine in respect to the local settings of the OS ...
For now I think I'll just create a setting in the config.txt file that lets you select between the two notation systems. Indicators for thousands are presently being left unused, and for now at least I don't plan to fix that. (If someone shows me a use case where they are needed or get dumped in anyway I'll look into it though.)
/... i have issues with localization - in the GUI i have explicite to replace the "1,00" and "0,00" for scale and rotation with "1.00" and "0.00" or it gives an exception .../ Viktor
Short-term fix thought: force the initial values to 1 and 0 with no decimals. Would need to put in a catch somewhere so this doesn't /always/ happen....