I am used to doing this in Cocoa-touch, so I assumed it would be quite simple. I have already tried:
field.text = [nsstring stringwithformat:@"%i", number];
[field setText:@"%i", number];
and setString, all to no avail.
This will work:
[field setStringValue:[NSString stringWithFormat:@"%i",number]];
If it doesn't do anything, it probably means field
isn't set to point to the field (e.g. by making a connection in Interface Builder).