Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
March 18, 2018, 02:43:12 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
   Home   Help Search Login Register Chat  
Pages: [1]   Go Down
Author Topic: Obsolete?  (Read 5826 times)
Posts: 1

« on: January 29, 2010, 01:09:59 AM »

I recently purchased a used copy of Programming in Objective-C. The intro and first chapter were a breeze and quite enjoyable. However, using Xcode 3.2.1, Program example 3.2 doesn't seem to be working properly.

Now that ObjC 2.0 is out, are the programs in my book completely obsolete?
Hero Member
Posts: 3114

« Reply #1 on: January 29, 2010, 06:21:10 AM »

I haven't tried those examples from the 1st edition in years.  You may need to use NSObject as the root object, import Foundation/Foundation.h instead of objc/object.h and use release instead of free to free your allocated objects.  This is basically the inverse of what's described in Chapter 14 of the first edition.

Those changes should be all that's needed for the first part of the book (there are some methods related to asking questions about classes in the first part that also won't work).  The second part on Foundation will likely work as is, except perhaps for some deprecated methods. 


Steve Kochan
Pages: [1]   Go Up
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Entire forum contents ゥ 2009 All rights reserved.