Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
December 14, 2017, 07:31:36 PM *
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
  Print  
Author Topic: Obsolete?  (Read 5514 times)
RRManager
Newbie
*
Posts: 1


Email
« 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?
Logged
skochan
Administrator
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. 

Cheers,

Steve Kochan
Logged
Pages: [1]   Go Up
  Print  
 
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 classroomM.com. All rights reserved.