Date format


#1

Ok, I’m new to Macs and coding for Macs, and the following is a rather minor quibble. After correcting the ‘flaw’ by adding the date to the application, I still have a flaw - the date is too long! I get the date formatted as follows:

Saturday, 25 February 2012 11:28:42 Greenwich Mean Time

The window is only wide enough to get to Gre. I’ve managed to get the right format though, by doing

NSString* nowString = [now description];
[textField setStringValue:nowString];

instead.

(Being one of the ‘more curious’, I was also intrigued by the addition of awakeFromNib to the .m file but not the .h file, though I’ve guessed that we’re simply not ‘advertising’ awakeFromNib since we aren’t supposed to call in manually.)

Best wishes,

Alan


#2

Later on in the book you’ll be introduced to the NSDateFormatter utility class, which provides a flexible solution to this.


#3

Guess I have the same problem only all I see is Frida and the first half of a y.
Warren