Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support European numerical pad (with comma instead of dot) #468

Open
danieldavid opened this issue May 24, 2017 · 0 comments
Open

Support European numerical pad (with comma instead of dot) #468

danieldavid opened this issue May 24, 2017 · 0 comments

Comments

@danieldavid
Copy link

Hi,
When using European numerical pad, decimal point is a comma (and not the dot we all know and use).
So when entering a number to a cell of numeric/float type , the "setValue" function inside FXForms.m convert it to double and basically remove the dot and practically convert it to int.
To handle it, the "double value" need to be replaced with NSNumber formatter.

This is the problematic line of code:
value = [(NSString *)value length]? @([value doubleValue]): nil;

These are the lines that can be used to replace the above:
NSNumberFormatter *nf = [NSNumberFormatter new];
value = [(NSString *)value length] ? @([[nf numberFromString:value] doubleValue]) : nil;

The result is a numeric number (with a dot instead of comma).

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant