Through the course of my progress through the iPhone Developer’s Cookbook, one thing is becoming increasingly clear to me: I did not understand fundamentals of Objective-C.

I really thought that my foundations in java, C#, and even C (thank you, Operating Systems with Jason Nieh) was enough.  I breezed through lists of the differences, read some code, and I was done, thankyouverymuch.  I even skimmed the “Objective-C bootcamp” section and deemed it irrelevant for me.

But with this challenge, I’ve promised myself to read every page of this book.  And you know what?  I really needed to RTFM.  Why?

  • I didn’t realize Objective-C is dynamically typed (even though I should have realized this with all the id variables floating around!)
  • I didn’t know selectors were basically just another way of saying “method name”
  • I didn’t know that if you do a child-to-parent assignment, like assigning an NSMutableArray to an NSArray, you’ll get the somewhat vague “assignment from distinct Objective-C” warning
  • I didn’t know you should always check for if (!self) in your init methods because in case of memory warnings, [super init] can return nil
  • I didn’t know that Apple has a standard on Class methods: any object returned by a class method is returned to you already autoreleased

It’s little things like these that can really trip me up.  So far, the Erica/Alexis project is incredibly rewarding.



No Responses to “OK, OK, I’ll RTFM!”  

  1. No Comments

Leave a Reply