New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

Cocoa Programming book by Aaron Hillegas question


Thread Closed

 
Thread Tools
Shogun

 
Member Since: Feb 15, 2009
Posts: 6
Shogun is on a distinguished road

Shogun is offline
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!
deer dance

 
deer dance's Avatar
 
Member Since: Jan 23, 2009
Location: Indiana
Posts: 162
deer dance has a little shameless behaviour in the past
Mac Specs: Soon to own

deer dance is offline
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
xstep

 
xstep's Avatar
 
Member Since: Jun 25, 2005
Location: On the road
Posts: 3,231
xstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to all
Mac Specs: 2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid

xstep is offline
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.
mystic_fm

 
Member Since: Mar 15, 2007
Posts: 161
mystic_fm will become famous soon enough
Mac Specs: 17" MacBook Pro, 2.33GHz C2D, 2GB RAM

mystic_fm is offline
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.)
Shogun

 
Member Since: Feb 15, 2009
Posts: 6
Shogun is on a distinguished road

Shogun is offline
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
TheCat007

 
TheCat007's Avatar
 
Member Since: Apr 13, 2009
Posts: 3
TheCat007 is on a distinguished road

TheCat007 is offline
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
mystic_fm

 
Member Since: Mar 15, 2007
Posts: 161
mystic_fm will become famous soon enough
Mac Specs: 17" MacBook Pro, 2.33GHz C2D, 2GB RAM

mystic_fm is offline
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/
TheCat007

 
TheCat007's Avatar
 
Member Since: Apr 13, 2009
Posts: 3
TheCat007 is on a distinguished road

TheCat007 is offline
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".
TheCat007

 
TheCat007's Avatar
 
Member Since: Apr 13, 2009
Posts: 3
TheCat007 is on a distinguished road

TheCat007 is offline
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!!
xstep

 
xstep's Avatar
 
Member Since: Jun 25, 2005
Location: On the road
Posts: 3,231
xstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to all
Mac Specs: 2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid

xstep is offline
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 Closed


« SDL c++ - While dragging a window I receave mousemotion events with wrong x,y values | dbg.gz »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Rookie Question: IBook vs. Power Book Paddytrix Schweb's Lounge 2 09-27-2005 05:43 PM
Power Book G4 question bwalk_79 Apple Notebooks 6 08-21-2005 01:33 PM
Address Book question section8joe Switcher Hangout 2 05-12-2005 08:31 PM
Entourage/Address book question briang OS X - Apps and Games 3 04-09-2005 12:03 PM
Ram Question fer teh BOOK! irishllama Apple Notebooks 8 01-13-2005 01:50 PM

All times are GMT -4. The time now is 08:14 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?