• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Docs, questions and stuff
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Docs, questions and stuff


  • Subject: Re: Docs, questions and stuff
  • From: Ondra Cada <email@hidden>
  • Date: Fri, 24 Aug 2001 16:14:37 +0200

planetexpress,

>>>>>> email@hidden (p) wrote at Fri, 24 Aug 2001 14:51:59 +0200:
p> Can someone recommend the "Learning Cocoa"
p> book for a newbie like me?

Well, ask Chuck Toporek ;)

p> What's the best way to learn ObjC?

do you know C well? If so, just read the ObjC on-line doc, and start playing
with it.

p> Should I
p> begin from Scratch with C++ and then go to ObjC?

Nope. C++ would not teach you anything worth the effort (but using the '//'
comments ;). Do learn C well, and then go ObjC. Some SmallTalk experience
would not hurt, but it's *NOT* mandatory by far.

p> Can you recommend a good book for "Learning ObjC"?

I was quite satisfied with the old good "Object-Oriented Programming -- an
Evolutionary Approach" by Brad Cox. I don't know whether it is currently
available, though -- it's a quite old thing.

Anyway, in my experience the ObjC is simple enough not to need a special
book. Just learn it with Cocoa.

p> Finally. :-) How do I create an array for integers? Would be nice to get a
p> small snippet that creates an array of integers and

NSMutableArray *a;

void addOneFibonacciNumberTo(NSMutableArray *a) {
int count=[a count];
if (count<2) [a addObject:[NSNumber numberWithInt:1]];
[a addObject:
[NSNumber numberWithInt:
[[a objectAtIndex:count-1] intValue]+[[a objectAtIndex:count-2] intValue]]];
}

p> is filling it inside a for loop.

for (i=1;i<1000;i+=3) // wahatever...
[a addObject:[NSNumber numberWithInt:i]];
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc


  • Follow-Ups:
    • Re: Docs, questions and stuff
      • From: Georg Tuparev <email@hidden>
References: 
 >Docs, questions and stuff (From: "email@hidden" <email@hidden>)

  • Prev by Date: Re: Docs, questions and stuff
  • Next by Date: Re: ---Help Needed for CocoaVitae.com--- Was: Re: Docs
  • Previous by thread: Re: Docs, questions and stuff
  • Next by thread: Re: Docs, questions and stuff
  • Index(es):
    • Date
    • Thread