Results 1 to 10 of 10
  1. #1


    Member Since
    Feb 15, 2009
    Posts
    6
    Cocoa Programming book by Aaron Hillegas question
    Hi,

    I'm a C / C++ / Java programmer and a few years ago I picked up a copy of the Cocoa Programming book by Aaron Hillegas as it looked as if I had to develop applications for the OS X platform. The book was highly recommended. It did not turn out that way though and I never had time to read the book or learn obj C and Cocoa.

    Now I do have to develop for the OS X platform, I have the second edition of the book but noticed that a third one has come out, as I don't have a lot of money I wonder if it's worth the expense to get the new edition or if I can read up on obj C 2, garbage collector and new core features on other places just as well and build from the second edition of the book?

    Thanks in advance!

  2. #2

    deer dance's Avatar
    Member Since
    Jan 23, 2009
    Location
    Indiana
    Posts
    162
    Specs:
    Soon to own
    It depends, do you feel that the newest version is necessary for you?

    Or is the older version enough for you to enjoy programming?

    Proud Python Programmer/HTML Expert
    Believer in Mac OS 7

  3. #3

    xstep's Avatar
    Member Since
    Jun 25, 2005
    Location
    On the road
    Posts
    3,231
    Specs:
    2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid
    Apple has changed the development environment enough that the new book is likely worth it for you, if you are getting paid for this development.
    CameraTime - Time lapse photography for novice and advanced users.

    When asking questions, post the version of your software. You'll receive better answers.

    Please post your results to the thread as it is good feedback.

  4. #4


    Member Since
    Mar 15, 2007
    Posts
    161
    Specs:
    17" MacBook Pro, 2.33GHz C2D, 2GB RAM
    I also had the 2nd edition of the book, but didn't get around to really digging into it myself until after I'd upgraded to Leopard and Xcode 3. I even started trying to go through the 2nd edition with Xcode 3, exactly like what you are thinking, but it didn't take long for me to realize that enough things had changed that I was just going to get frustrated unless I got the 3rd edition of the book as well. So I did get the newer edition, and never regretted it.

    (This of course is assuming that you're going to be asked to develop using Xcode 3.x, rather than Xcode 2.x.)

  5. #5


    Member Since
    Feb 15, 2009
    Posts
    6
    I am indeed going to have to develop using xcode 3.x, I suppose there is no way out of it but to buy the new edition of the book. It'll most likely repay itself in saved time.

    Thanks to everyone who answered

  6. #6

    TheCat007's Avatar
    Member Since
    Apr 13, 2009
    Posts
    3
    I wish Aaron had a site where we could ask questions about code snippets he talks about doesn't seem to work. I'm obviously missing something but it very frustrating when an example doesn't work and there doesn't seem to be an explanation. On Pg 90 of his Third edition book there is a code snippet that shows how to programatically add a target selector to a button. When I add the code I get an error message saying "Error: 'Testbutton undeclared first use of this function" here's the code snippet. I have a button labeled TestButton in interface builder as well as the appController object and sayIt: function.

    SEL mySelector;
    //mySelector = NSSelectorFromString(@"sayIt:");
    mySelector = @selector(sayIt;
    [TestButton setTarget:AppController];

    [TestButton setAction:mySelector];

    as anybody run into this?



    PS> My vote is for the new book

  7. #7


    Member Since
    Mar 15, 2007
    Posts
    161
    Specs:
    17" MacBook Pro, 2.33GHz C2D, 2GB RAM
    Quote Originally Posted by TheCat007 View Post
    I wish Aaron had a site where we could ask questions about code snippets he talks about doesn't seem to work.
    No need to wish for it, it's right here: http://techstra.bignerdranch.com/

  8. #8

    TheCat007's Avatar
    Member Since
    Apr 13, 2009
    Posts
    3
    Quote Originally Posted by mystic_fm View Post
    No need to wish for it, it's right here: http://techstra.bignerdranch.com/
    Thanks for the link. I did see that site but for some reason I didn't make the connection that i could leave messages there regarding his book. I posted my problem there on Pg 90 of his book but so far have not seen a response. Could you or someone here perhaps answer my question.
    I'm trying to understand how to add an action and target programmatically using the code snippet he provided. I seem to be missing the link to the TestButton I created in Interface builder. Is there a .h file I need to include. Is this error telling me that it does not recognize the button I created? It seem that it does since as soon as I start to enter "TestB" the auto complete kicks in and adds the "utton".

  9. #9

    TheCat007's Avatar
    Member Since
    Apr 13, 2009
    Posts
    3
    OK, Nobody seems to be jumping in here. Am I posting in the wrong place? I am making some progress though so I'll divulge what I'v done so far. I seem to have gotten rid of the error by declaring an "IBOutlet NSButton *testButton;" and linked it from my appController class to the TestButton in interface builder. I also moved "SEL mySelector;" to the .h file. I notice though that if I stopped the debugger at the line before "[TestButton setAction:mySelector];" I do not see an address assigned to TestButton.

    I know I may be doing this all wrong but that why I need some direction. Please help!!

  10. #10

    xstep's Avatar
    Member Since
    Jun 25, 2005
    Location
    On the road
    Posts
    3,231
    Specs:
    2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid
    TheCat007, you may not be getting a response to you question because you high jacked a thread. It is best to start a new one. The only reason I saw this is because I'm subscribed to this thread, for now.

    The error suggests that you haven't declared (or perhaps initialized) TestButton. Perhaps the capitalizaion is wrong; lower case b in the message and upper case B in name in your code sample.
    CameraTime - Time lapse photography for novice and advanced users.

    When asking questions, post the version of your software. You'll receive better answers.

    Please post your results to the thread as it is good feedback.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Question about Programming
    By mag709 in forum iOS Development
    Replies: 2
    Last Post: 05-17-2012, 04:19 PM
  2. Cocoa programming issue
    By Meds in forum OS X - Development and Darwin
    Replies: 13
    Last Post: 03-07-2009, 06:02 AM
  3. Add Help book to cocoa app
    By HYGSBM in forum OS X - Development and Darwin
    Replies: 2
    Last Post: 09-30-2008, 10:47 PM
  4. Cocoa Programming for Mac OS X
    By NSNick in forum OS X - Development and Darwin
    Replies: 0
    Last Post: 06-21-2008, 07:34 PM
  5. Cocoa question
    By Osiris22x in forum OS X - Development and Darwin
    Replies: 1
    Last Post: 04-09-2007, 03:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •