Chapter 3: Two-Stage Creation

In C++, Java and other object-oriented programming languages, objects are created with the new operator. Cocoa, on the other hand, uses a two-stage process. The first is allocation, which sets aside memory for the new object, and the second initializes the object.

I typed in the chapter’s example code, a sub-class of NSCell called MyLabeledBarCell. I got it to compile, but figuring out how to use it in an actual, interesting program didn’t seem obvious to me. However, the note on page 42 says that Chapter 21 (Prototype) gives an example of using this class, so I skipped ahead to that chapter. See the next post for the details.

This entry was posted in Uncategorized and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s