Objective-C: first impression

Reading Time: < 1 minute

I like Apple products: I had iPod Nano (2nd gen) since 2007, and I owned MacBook (white plastic), and bought iPhone for my wife this Jan. All bring us very good user experience. That is not to say, Apple products are flawless. IPod and iPhone will die once a while, but nothing catastrophic as it does not erase music etc. MacBook has minor problems too such as “could not come back to life after hibernate”, and the heat generated by battery. But I like both my old iPod nano and my fairly new MacBook (the user interface is just beautiful 😀

Ok, now back to the hard part. One reason I bought MacBook is I want to learn Objective C (the programming language on Mac OS X) and Cocoa (UI framework). My first impression (after almost a year, on and off) on Objective C and Cocoa (using XCode) is: very unforgiving, like Steve Jobs 🙁

Two little stories from my own study, both on Chapter 9 NSUndoManager

1) I forgot to add [self startObservingPerson:p] at
(void)insertObject:(Person *)p inEmployeesAtIndex:(int)index

This gives me a runtime error took me 3 months to figure out (I googled for answer, but could not find anything directly address the problem, finally I found my stupid mistake).

2) More recently, I could not drag the tableView outlet (of File’s Owner) to the table view, until I found at p93, Chapter 5 Target Action, “Debugging Hints”.

NSTabView *tableView instead of NSTableView

Aha !!!

%d bloggers like this: