• 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
Attributed Strings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Attributed Strings


  • Subject: Attributed Strings
  • From: "Mike R. Manzano" <email@hidden>
  • Date: Fri, 11 Mar 2005 13:57:16 -0800

Regarding NSAttributedStrings, the docs say for its init methods:

Returns an initialized object, which might be different than the original receiver

Does this mean that I should autorelease my original object before initing it? Like this?

NSAttributedString* aString = [ [ NSAttributedString alloc ] autorelease ] ;
NSAttributedString* myActualString = [ [ aString initWithString:@"la dee dah" ] retain ] ;


Also, for the second line, I assume I have to retain it, right?

If this is the case, it seems like attributed strings are a pain in the butt.

	~ Mike




_______________________________________________ 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: Attributed Strings
      • From: Sherm Pendley <email@hidden>
  • Prev by Date: Re: Is Mac Mini capable to develop cocoa app?
  • Next by Date: Re: Is Mac Mini capable to develop cocoa app?
  • Previous by thread: Re: Locating a File from NSURLDownload
  • Next by thread: Re: Attributed Strings
  • Index(es):
    • Date
    • Thread