CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Float numbers in edit

by Soren SDF » 20 Nov 2014 09:27

Hi,

When i set EditType to jqmetNumber and type a "," for decimalseparator the Value and Text properties return 0.
It works as expected when i use ".". How do I change the decimalseparator?
In my servercontrollers NewSession event i have this code

DateSeparator:=FSettings.DateSeparator;
ShortDateFormat:=FSettings.ShortDateFormat;
DecimalSeparator:=FSettings.DecimalSeparator;
CurrencyString:=FSettings.CurrencyString;
CurrencyFormat:=FSettings.CurrencyFormat;
LongTimeFormat:=FSettings.LongTimeFormat;

which seems to work fine apart from in JQMEdit.

T.I.A.
Sören A.
Soren SDF
 
Posts: 87
Joined: 19 Apr 2013 15:56

by Alexander Bulei » 20 Nov 2014 11:14

Hi Soren,

Checked and works as expected with both decimal palces ("." and ",")

Do you have defined the Max/Min properties?

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by Soren SDF » 20 Nov 2014 11:51

Only the default values.
Could you perhaps send me some demo code?

Sören A
Soren SDF
 
Posts: 87
Joined: 19 Apr 2013 15:56

by Alexander Bulei » 20 Nov 2014 15:32

Hi Soren SDF,

Tested with standard usage of component.

delphi code
procedure TIWAppForm6.IWCGJQMButton1JQMButtonOptionsEventsVClick(Sender: TObject; AParams: TStringList);
begin
WebApplication.ShowMessage(FloatToStr(IWCGJQMEdit1.JQMEditOptions.NumberOptions.Value));
end;


In which browser it happens?

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by Alexander Bulei » 20 Nov 2014 15:47

Hi Soren SDF,

Ok, I detected this behavior only on IE.

Fixed in next beta version.

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by Soren SDF » 20 Nov 2014 16:14

Hi again.

I put your code snippet in my code and tested all ny installed browsers with the following result:

Browser Typed value Value in showmessage
IE 11 2,5 0
IE 11 2.5 2,5
Firefox 2,5 0
Firefox 2.5 2,5
Chrome 2,5 2,5
Chrome 2.5 2,5
Safari 2,5 2
Safari 2.5 2,5
Opera 2,5 2,5
Opera 2.5 2,5

Sören A
Soren SDF
 
Posts: 87
Joined: 19 Apr 2013 15:56

by Alexander Bulei » 20 Nov 2014 16:17

Hi Soren SDF,

I have latest FireFox and I doesn't have this behavior.
Btw, fixed.

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by Soren SDF » 21 Nov 2014 09:55

Great. Looking forward to the update.

Thx
Sören A
Soren SDF
 
Posts: 87
Joined: 19 Apr 2013 15:56


Return to JQMEdit

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.