I have an NSSearchField where the user can type in a number with decimals to search through data. I am having problems with using a NumberFormatter to display the correct format.
I added this in IB:
What happens is, as soon as the user types the decimal point (or whatever the local character for that is), the field becomes empty. Same happens when I type a letter (this is expected), so it seems that the decimal point gets rejected as if it is a letter. Of course, not what I want.
Tried many different combinations of those checkboxes halfway the picture (including "Generate Decimal Numbers"), but cannot get it to work.
If you look at the sample at the bottom of the picture, that looks ok.
And there is nothing in the code that manipulates the search field.

I finally solved it by completely dropping the formatter and just filter the string in
controlTextDidChange. Note that this works for bothNSTextFieldandNSSearchField.