• 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: Message dialog on Cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Message dialog on Cocoa


  • Subject: Re: Message dialog on Cocoa
  • From: Nick Zitzmann <email@hidden>
  • Date: Fri, 20 Jul 2007 01:47:01 -0600


On Jul 20, 2007, at 1:37 AM, Felipe Monteiro de Carvalho wrote:

Next, while trying to use it, I see that the documentation for
NSString is huge. But I found 2 methods that look good ways of
creating a NSString to pass to NSRunAlertPanel

initWithUTF8String

This method creates a permanent NSString.

stringWithUTF8String

This method creates a temporary (autoreleased) NSString.

But reading the docs I don't understang what is the difference between
them...any one know which one I should use?

Neither. Use NSLocalizedString() if it is a string that will be displayed to the user. That way, if you ever want to add localization support in the future, then your application will already be properly tooled for localization support.


Nick Zitzmann
<http://www.chronosnet.com/>




_______________________________________________

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: 
 >Message dialog on Cocoa (From: "Felipe Monteiro de Carvalho" <email@hidden>)
 >Re: Message dialog on Cocoa (From: ∞ <email@hidden>)
 >Re: Message dialog on Cocoa (From: "Felipe Monteiro de Carvalho" <email@hidden>)

  • Prev by Date: Re: Message dialog on Cocoa
  • Next by Date: Re: beginSheet, doesn't stop NSThread
  • Previous by thread: Re: Message dialog on Cocoa
  • Next by thread: Re: Message dialog on Cocoa
  • Index(es):
    • Date
    • Thread