How do I restrict a NSTextfield to allow only numbers/integers? I\'ve found questions like this one, but they didn\'t help!
NSTextfield
In SWIFT, I do it this way
If less than 0, display error message other accept the value
if ((Int(txtField.stringValue)) < 0){ // Display error message }