• 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
Learning Cocoa/ObjectiveC and wondering why I had to do this.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Learning Cocoa/ObjectiveC and wondering why I had to do this.


  • Subject: Learning Cocoa/ObjectiveC and wondering why I had to do this.
  • From: Tom Boucher <email@hidden>
  • Date: Sun, 6 Mar 2005 17:20:03 -0500

Can you translate this for me?

NSString *result = [NSString stringWithFormat:@"%@ has %u letters.",string,letterCount];

It did what I wanted, which was create a string that is the results of a string, an unsigned int and some other words and put them in there.

But it didn't do it the way I thought I should. I can't figure out why I had to put the NSString inside the object call [NSString stringWithFormat...]

Was doing the challenge in that one Big Nerd Ranch cocoa book and got lost a bit.

My C skills are rusty, it's been a few years. So I apologize for the blatant newb post.

Attachment: PGP.sig
Description: This is a digitally signed message part

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Learning Cocoa/ObjectiveC and wondering why I had to do this.
      • From: Jeremy French <email@hidden>
    • Re: Learning Cocoa/ObjectiveC and wondering why I had to do this.
      • From: "M. Uli Kusterer" <email@hidden>
    • Re: Learning Cocoa/ObjectiveC and wondering why I had to do this.
      • From: j o a r <email@hidden>
    • Re: Learning Cocoa/ObjectiveC and wondering why I had to do this.
      • From: Tony Cate <email@hidden>
  • Prev by Date: Re: iTunes Music Library parsing help
  • Next by Date: Re: Struggling with basics of Objective C
  • Previous by thread: Any method to prevent context help mode?
  • Next by thread: Re: Learning Cocoa/ObjectiveC and wondering why I had to do this.
  • Index(es):
    • Date
    • Thread