I can’t explain it – I made outerCalculation a text field and had 3 buttons whose titles were “5”,“7”, and “.” and I copied and pasted your code. I didn’t get what you got – I got what you would expect.
I guess there is a number formatter attached to the text field.
With an international number format using a comma as decimal separator and the default number formatter setting the result of [textField setStringValue:@“7.5”] is “75”
That’s right, Stefan. I didn’t expect this singular behavior. I just wanted it to put a leading zero if the user typed “.5”, as on a usual calculator (and I didn’t succeed).
Well, I’m really impressed!
Thank you!
Edit: I unchecked the “localize” option and everything is working fine now.