Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » LineEdit, EditFields, DocEdit » Please help debug this program (Re: EditDouble with customized Convert)
Re: Please help debug this program (Re: EditDouble with customized Convert) [message #41321 is a reply to message #41313] Sat, 30 November 2013 16:23 Go to previous messageGo to previous message
Lance is currently offline  Lance
Messages: 526
Registered: March 2007
Contributor
OK. I figured out.

The problem occurs because I SHOULD HAVE provided a matching filter to NOT TO replace comma with dot (the default behavior it inherits from its parent ConvertDouble), but should instead filter out it. Morale is, Scan/Format/Filter should work together to assure the EditField is in a consistent state.

The second question, if you want to format a double to certain dicimal digits and with thousand separtor, you should:
1. SetLangue properly;
2. The format string should be something like this "%3!nl", which will format the number to 3 decimal points and with localized thousand separtors. Eg, in enUS, 12345.6 will be formatted to 12,345.600.

I had to go through the code to figure it. Maybe a example line can be added to the Format example to save somebody else some trouble in the future.

===============================
CORRECTION: the problem remains after a customized filter has been provided to take care of the comma separator. Now I am almost positive that it's a bug in the library.

I have attached a slightly revised test case. Just drag the text between the edits a few times, you WILL observe erratic behavior.
  • Attachment: EditTest.zip
    (Size: 1.21KB, Downloaded 266 times)

[Updated on: Sat, 30 November 2013 17:05]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Wrap EditString Rect to text
Next Topic: New method with EditorSyntax
Goto Forum:
  


Current Time: Fri Apr 26 08:00:53 CEST 2024

Total time taken to generate the page: 0.04734 seconds