Author Topic: Re-Post "Regional Settings mcStudio"  (Read 114 times)

mcThings

  • We Connect Things To The Internet... That Can't Be Plugged In.
  • Administrator
  • Jr. Member
  • *****
  • Posts: 68
    • View Profile
    • www.mcthings.com
Re-Post "Regional Settings mcStudio"
« on: June 06, 2016, 10:59:23 am »
kristofferis2din Support2
Regional Settings mcStudio
0
Hello.
I have found a bug in mcStudio and how it handles regional settings, I live in Sweden and I have my regional setting set to Swedish and that means that the decimal symbol is ,(comma) not .(dot) if i change my decimal symbol to .(dot) then it works as it should in mcStudio so the bug is verified )
I have an easy user case to verify this bug.
Set decimal symbol in windows to ,(comma) and start mcStudio and load example project Temperatur.
mcStudio will now show error on line 12 (Number does not fit in a float. Unsupported value.)
If i try to change the .(dot) in the code to my decimal symbol ,(comma) then mcStudio provide me this error (***Unmatched parenthesis!) mcStudio does not handle the comma as a decimal in this case.
The best solution is to decide what we should use as decimal symbol and not let Windows decide, it will be hard to share code between countries otherwise.Like

mcJohn
mcJohnAdmin1d
Interesting point. The token parser does a Single.TryParse(_RawValue, flt) to get the value out. That's where it dies. I see that this method has some overloads so it is possible to overwrite the windows setting.
I am originally from Europe so I should have known better. Anyway this will be solved in the next versionLike

kristofferis
kristofferis1d
Hello. That sounds good. I know that it's very easy to make small mistakes like this, I have myself made same mistake in a C# .NET application )

Share on Facebook Share on Twitter