• 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: Re Re: String variables in classes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re Re: String variables in classes


  • Subject: Re: Re Re: String variables in classes
  • From: Charles Srstka <email@hidden>
  • Date: Sun, 2 Jan 2011 18:30:27 -0600

On Jan 2, 2011, at 6:10 PM, Stephen J. Butler wrote:

> - Charles asks 'why the @""' and I can answer that question: because
> you couldn't figure out another way to call stringByAppendingFormat:
> could you? The answer is that in this case you should be calling
> +[NSString stringWithFormat:]. However...

Ah — my assumption was that he wanted to keep appending previous results to the string, so it’d create sort of a log file sort of thing (or, since his object is a calculator, something akin to a roll of tape on an adding machine). In this case, using -stringByAppendingString: (or just using an NSMutableString) would be correct, although the assignment to an empty string would be wrong.

Charles_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re Re: String variables in classes (From: Brian Durocher <email@hidden>)
 >Re: Re Re: String variables in classes (From: "Stephen J. Butler" <email@hidden>)

  • Prev by Date: Re: Re Re: String variables in classes
  • Next by Date: Re: Re Re: String variables in classes
  • Previous by thread: Re: Re Re: String variables in classes
  • Next by thread: Re: Re Re: String variables in classes
  • Index(es):
    • Date
    • Thread