I have an NSTextField which holds numeric (integer) values. There is a number formatter attached to the field. I want to display an empty field when the value of the field is set to 0 (zero). I think I tried every combination with the formatter, without luck so far. Can this be done?
I have an NSTextField which holds numeric (integer) values. There is a number formatter
Share
I don’t think you can do that with NSNumberFormatter. But you could make a subclass and implement
stringFromNumber:something like this:EDIT:
I was wrong. You can do that with NSNumberFormatter: