Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Good Objective-C for beginner tutorial?

Good Objective-C for beginner tutorial?
Thread Tools
Jaey
Mac Elite
Join Date: Dec 2003
Status: Offline
Reply With Quote
Mar 27, 2004, 11:32 PM
 
I went through the Objective-C tutorial at the Apple Developer site, but I'm not really interested in making a currency converter. I don't think I got enough out of the tutorial to be able to write my own application either, so can any of you recommend a different tutorial?

My hope is, actually, to make a simple text editor or something...
     
Chuckit
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Mar 28, 2004, 03:25 AM
 
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
proton
Senior User
Join Date: Nov 2000
Status: Offline
Reply With Quote
Mar 28, 2004, 04:43 AM
 
Originally posted by Jaey:
My hope is, actually, to make a simple text editor or something...
The source code for the TextEdit editor that comes with Mac OS X is available here:
file:///Developer/Examples/AppKit/TextEdit/

- proton
     
Jaey  (op)
Mac Elite
Join Date: Dec 2003
Status: Offline
Reply With Quote
Mar 28, 2004, 02:18 PM
 
Originally posted by Chuckit:
http://www.macdevcenter.com/pub/ct/37
Thanks that's probably just what I was looking for... I'll also look at the source for TextEdit, and see if I can get anything out of it.
     
Jaey  (op)
Mac Elite
Join Date: Dec 2003
Status: Offline
Reply With Quote
Mar 28, 2004, 02:40 PM
 
Huh, I went through this tutorial and made a little text editor... I was kind of surprised how easy it was. Infact, I didn't need to write any code....?
     
Chuckit
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Mar 28, 2004, 05:17 PM
 
Originally posted by Jaey:
Huh, I went through this tutorial and made a little text editor... I was kind of surprised how easy it was. Infact, I didn't need to write any code....?
Yep. Cocoa provides more text editing functionality than you'll likely ever need, so a bare-bones text editor can be created with no code. (The second half of the text editor tutorial does require something like 4 lines of code, though.)

Recreating NSTextView from scratch, on the other hand, is a gi-normous pain in the butt.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
alephnull
Fresh-Faced Recruit
Join Date: Mar 2004
Status: Offline
Reply With Quote
Mar 29, 2004, 12:03 PM
 
I don't know whether my experience is typical, but over the course of a year or more I worked through several different tutorials like the ones mentioned here but never felt as though I was grasping even the basic concepts. I could tinker around the edges of the tutorial (e.g., add some small new feature) but anything beyond that was out of my reach.

As time went on, I did find two books that helped get me over this hump. One is the Hillegass book (Cocoa Programming for Mac OS X) and the other is the Anguish book (Cocoa Programming). There are a number of concepts that I only started to understand with the Anguish book. I don't mean to disparage any of the other books, because I own and have learned from each, but I found these two particularly helpful.

Frankly, there is a big need for intermediate books on Cocoa and Objective-C. I am regularly wrestling with something that, in the end, is not that difficult, but there is little or no discussion of it in the books or on-line docs.

So, this is probably somewhat off-topic, but I just wanted to suggest that the tutorials, while fine ways to get a taste for the tools, may not take you nearly as far down the road of learning Cocoa as you might be hoping. In the end, I can definitely say that it is worth the effort, but there is a lot to learn.

Good luck!
     
larkost
Mac Elite
Join Date: Oct 1999
Location: San Jose, Ca
Status: Offline
Reply With Quote
Mar 29, 2004, 04:11 PM
 
alephnull: Have a look at the Mac OS X Developer list that is hosted by Omni. There is also a search engine for that and another list (I forget its url though). There are more answers there than you can shake a stick at.
     
alephnull
Fresh-Faced Recruit
Join Date: Mar 2004
Status: Offline
Reply With Quote
Mar 29, 2004, 05:14 PM
 
Larkost: thanks for the tip -- I will definitely check it out!
     
Jaey  (op)
Mac Elite
Join Date: Dec 2003
Status: Offline
Reply With Quote
Apr 1, 2004, 06:47 PM
 
Um, I do notice that I can't save my documents using the program from the tutorial...
     
dcsmrgun
Junior Member
Join Date: Aug 2003
Status: Offline
Reply With Quote
Apr 11, 2004, 02:04 PM
 
I wholeheartedly recommend "Learning Cocoa with Objective-C" by James Duncan Davidson (O'Reilly, ADC recommended title).

I'm from a scripting background (shell, ASP, PHP), so a lot of the OO concepts were completely foreign to me. James does a great job of not throwing things completely over your head.


To be fair, I did re-read most chapters 2 or 3 times over the span of a week, but that was more for my own peace of mind than anything. After every example he provided, I tried to adapt it somehow, perhaps combine code from previous examples into a working little application. Some concepts WILL take some re-reading and external research to understand. Don't be afraid to experiment.

My biggest problem was setting my goals too high. Sure writing a currency converter may not be your idea of a fun time, but it has its purpose. Try not to think about what you're writing, but why you're writing it. You'll write your killer app sooner or later, but you'll NEVER do it unless you start small.
     
sjt
Fresh-Faced Recruit
Join Date: Feb 2001
Location: London, UK
Status: Offline
Reply With Quote
Apr 11, 2004, 09:12 PM
 
There's some good stuff at www.cocoadevcentral.com
Sam
So long, and thanks for all the fish.
     
starman
Clinically Insane
Join Date: Jun 2000
Location: Union County, NJ
Status: Offline
Reply With Quote
Apr 13, 2004, 12:54 PM
 
You can read "Programming in Objective-C" by Steve Kochan.

Of course, my name's in the book .

Mike

Home - Twitter - Sig Wall-Retired - Flickr
     
itai195
Addicted to MacNN
Join Date: May 2001
Location: Cupertino, CA
Status: Offline
Reply With Quote
Apr 13, 2004, 04:56 PM
 
Originally posted by alephnull:
I don't know whether my experience is typical, but over the course of a year or more I worked through several different tutorials like the ones mentioned here but never felt as though I was grasping even the basic concepts. I could tinker around the edges of the tutorial (e.g., add some small new feature) but anything beyond that was out of my reach.

As time went on, I did find two books that helped get me over this hump. One is the Hillegass book (Cocoa Programming for Mac OS X) and the other is the Anguish book (Cocoa Programming). There are a number of concepts that I only started to understand with the Anguish book. I don't mean to disparage any of the other books, because I own and have learned from each, but I found these two particularly helpful.


Thank you! I've been blasted by some people on this board for insisting that reading one or both of these books is the best way to learn Cocoa. The tutorials will only get you so far, and they don't provide nearly as comprehensive a view.

As for intermediate questions, don't hesitate to ask them here. We're not all experts by any means.
     
theolein
Addicted to MacNN
Join Date: Feb 2001
Location: zurich, switzerland
Status: Offline
Reply With Quote
Apr 17, 2004, 11:03 AM
 
For a fantastic tutorial to the ObjC language itself, I would suggest this link. It gives you an excellent intro to the language, as opposed to the Cocoa frameworks, which are much more than the basic language itself. I bought the O'Reilly Cocoa book back in 2001, but rapidly found that they expected you to have read your way through the mind numbing ObjC articles on Apple's website first. I also eventually bought the O'Reilly ObjC Pocket Reference, which also provides an excellent intro to the language itself.

Of course, a good tutorial on C won't do any harm either.
weird wabbit
     
Truepop
Mac Elite
Join Date: Mar 2003
Status: Offline
Reply With Quote
May 4, 2004, 01:24 AM
 
     
hayesk
Guest
Status:
Reply With Quote
May 4, 2004, 01:32 PM
 
Get Aaron Hillegass' book. It's fantastic - it has examples for most features, and it has challenges at the end of each chapter. I recommend working through the whole book and doing all of the challenges.

http://www.bignerdranch.com/products/cocoa1.shtml
     
djohnson
Professional Poster
Join Date: Sep 2000
Location: Texas
Status: Offline
Reply With Quote
May 4, 2004, 03:06 PM
 
Here is an excellent list.

http://cocoa.mamasam.com
     
   
 
Forum Links
Forum 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
Top
Privacy Policy
All times are GMT -4. The time now is 04:01 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,