[Mono-bugs] [Bug 661750] Setting value of hexadecimal NumericUpDown control to 0 crashes Mono runtime

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun Jan 2 10:39:00 EST 2011


https://bugzilla.novell.com/show_bug.cgi?id=661750

https://bugzilla.novell.com/show_bug.cgi?id=661750#c2


--- Comment #2 from Oliver Thimm <oliver.thimm at web.de> 2011-01-02 15:38:59 UTC ---
I think your suggested change would fix this ugly bug.

In my opinion the complete conversion algorithm to a hexadecimal string can be
replaced by the following expression:

    Text = ((Int64)dvalue).ToString("X", CultureInfo.CurrentCulture);

even if the comment suggest that this should not be done. This would fix the
bug and simplify the implementation. As a hexadecimal NumericUpDown is limited
to Int32.MaxValue/Int32.MinValue this should be OK.

I extended my initial sample code by an additional text box which is updated
with the converted string as described above every time the value of the
NumericUpDown change, set the increment to 0.1 and checked with .NET that both
values are always in sync. Running this sample on Mono I found another bug that
only the digits 0-9 are accepted in the NumericUpDown control in hex mode but I
will file a separate bug report for this issue.

What do you think about such an implementation ? Do you think we should discuss
this on the mailing list ?

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list