Generated init method incompattible with user's regional

Posted by Simon L. Prinsloo on 12-Oct-2016 07:09

OpenEdge 11.5 on Win32 / Win64.

We've put a UltraNumericEditor on a screen and set its maximum value to 100.001. The following code was generated:

DEFINE PRIVATE VARIABLE ultraNumericEditor1            AS Infragistics.Win.UltraWinEditors.UltraNumericEditor          NO-UNDO.

....

 METHOD PRIVATE VOID InitializeComponent ():
......
    THIS-OBJECT:ultraNumericEditor1:MaxValue = Progress.Util.CastUtil:ToDouble("100.001":U).
.......


This works perfectly until the code is executed on a machine where the decimal symbol in the regional settings is defined as comma, rather than a full stop.

In that case, launching the program results in:
System.FormatException: Input string was not in a correct format.

In code we write ourselves, we use "System.Globalization.NumberFormatInfo:CurrentInfo:NumberDecimalSeparator" in cases like this in order to honour the user's choice of decimal symbol, but what should we do in this case?

Posted by Mike Fechner on 12-Oct-2016 07:12
Log a bug with TS.

All Replies

Posted by Mike Fechner on 12-Oct-2016 07:12
Log a bug with TS.
This thread is closed