I am creating an OS X app and when I do this:
var tempVal = 10495.33
tempTextField.doubleValue = self.tempVal
It shows like this: 10,495.33
. Notice the comma.
Now when I modify that value to 30,400.34 in the NSTextField and try to assign it back to the doubleValue things get messed up.
tempVal = tempTextField.doubleValue //Now this makes tempVal = 30 instead of 30,400.34
This is all because of the comma. Without the comma things are fine.
I know there is a bad fix where I just remove all commas from the number string but I feel like there is a better/correct way to do this.