• 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: NSAttributedString error.... [a solution]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSAttributedString error.... [a solution]


  • Subject: Re: NSAttributedString error.... [a solution]
  • From: Sherm Pendley <email@hidden>
  • Date: Thu, 30 Jan 2003 14:17:10 -0500

On Thursday, January 30, 2003, at 12:11 PM, Steven M.Palm wrote:

Unsure as of yet why the application just dies

The docs for the cString method mention that it raises an NSCharacterConversionException if the receiver can't be converted to a cString without loss of information. If an exception is raised without being caught, the default behavior is to die.

You can avoid the exception by using the lossyCString method, or as you said, by checking to ensure that the string can be converted to ASCII encoding before calling cString.

sherm--

"I have no special gift, I am only passionately curious." - Albert Einstein
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
References: 
 >Re: NSAttributedString error.... [a solution] (From: "Steven M.Palm" <email@hidden>)

  • Prev by Date: Re: copyWithZone and NSImageView subclass
  • Next by Date: ANN: FileStorm 1.5
  • Previous by thread: Re: NSAttributedString error.... [a solution]
  • Next by thread: Re: NSAttributedString error....
  • Index(es):
    • Date
    • Thread