Amazon.com Widgets 4th edition =(
Welcome, Guest. Please login or register.
Did you miss your activation email?
July 25, 2014, 06:40:31 AM
Home Help Search chat Login Register   
News: Read this please.The Great Kangaroo Escape Looking for reviews of the 4th ed on Amazon!   Twitter:  @skochan
                     

+  Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
|-+  Old Stuff
| |-+  Newbie Corner
| | |-+  4th edition =(
Pages: [1]   Go Down
Print
Author Topic: 4th edition =(  (Read 1171 times)
cytotoxictcell
Newbie
*
Posts: 1


Email




« on: October 19, 2011, 07:17:25 PM »

I just bought the 3rd edition and right now i know nothing about programming except a little Visual Basic (big deal lol) but i know i am no where near Ios development but will the 3rd edition be out of date Objective-c wise? I mean language itself not out of date like Ios 4 which is out of date because of Ios 6
Logged
fujilla
Global Moderator
Sr. Member
*****
Posts: 276


WWW




« Reply #1 on: October 20, 2011, 12:53:05 AM »

In terms of the Objective-C language, you can still use the 1 - 3 editions.  The difference in the 4th edition will be with regards to memory management - ARC (automatic reference counting).

Nick
http://myfirstiphoneapp.co.uk
http://easyintervalsapp.co.uk
Logged
seerex
Full Member
***
Posts: 177


Email




« Reply #2 on: October 20, 2011, 06:29:05 AM »

Hello,

You can still use the third edition, with a little thumb rule. If you use Xcode 4.2 (which i suggest you do), you will be working with a new feature called ARC (Automatic Reference Counting). Before that, you had to keep track of some memory management stuff, and with ARC you don't need to. So every time you see the statement "Release, Retain, Autorelease" and more, you simply ignore them and DONT type them. For every discussion there is on memory management, you can simply skip or "not care" as it is now being handled for you.

Best Regards
/JBJ
Logged

Best Regards -
J.B.J
If you think i helped you could return the favor Wink

Subscribe to my channel on youtube: http://www.youtube.com/user/JBJProgramming

My apps:
- iTap Fruits (all countries)
- Toilet-Quiz (Denmark only)
- Zoo Kids (Denmark only)
- Diablo Item Database (All countries)
Scrib64
Newbie
*
Posts: 1


Email




« Reply #3 on: October 26, 2011, 01:30:58 PM »

Hi - I'm a newby, also with the same problem. I'm going to carry on with the third edition book as I see the forth edition (which includes ARC) isn't out until the 15th December.

One question I have though is that in the book (third edition) it talks about running the first example (prog1) from the terminal using gcc. So when I created the new project in Xcode 4.2 using Foundation & Command Line tool it gave me this:

#import <Foundation/Foundation.h>
int main (int argc, const char * argv[])
{
    @autoreleasepool {
       
        // insert code here...
        NSLog(@"Hello, World!");       
    }
    return 0;
}

And this compiles and runs fine in XCode. But when I try and run the same code (in a different file as per the book) using gcc from terminal:

 gcc -framework Foundation ./main.m -o prog1

I get this error:

 ./main.m -o prog1
./main.m: In function ‘main’:
./main.m:14: error: stray ‘@’ in program
./main.m:14: error: ‘autoreleasepool’ undeclared (first use in this function)
./main.m:14: error: (Each undeclared identifier is reported only once
./main.m:14: error: for each function it appears in.)
./main.m:14: error: expected ‘;’ before ‘{’ token

Any idea why? Its not a show stopper I'm just curious.
Logged
Waiting
Global Moderator
Full Member
*****
Posts: 113






« Reply #4 on: October 26, 2011, 02:38:40 PM »

Sounds ike its not prepared for ARC code with the options given.
Logged
skochan
Administrator
Hero Member
*****
Posts: 3114







« Reply #5 on: October 28, 2011, 04:36:28 AM »

You need to use clang instead of gcc for your command line:

Code: (Objective-C)
clang -fobjc-arc -framework foundation -std=c99 main.m -o prog1

Cheers,

Steve
Logged
iExchange
Newbie
*
Posts: 1






« Reply #6 on: December 14, 2011, 03:56:22 AM »

So I can completely ignore chapter 17?
I'm a third edition holder, thanks!
Logged
Pages: [1]   Go Up
Print
Jump to:  



Login with username, password and session length

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 (c) 2009 classroomM.com. All rights reserved.