• 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: NSAttributtedString initWithHTML skip styles
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSAttributtedString initWithHTML skip styles


  • Subject: Re: NSAttributtedString initWithHTML skip styles
  • From: Jens Alfke <email@hidden>
  • Date: Thu, 11 Feb 2010 08:13:33 -0800

On Feb 11, 2010, at 2:45 AM, Gustavo Pizano wrote:

> [(XWSDefaultComponentView *)[component view] setString:[valueString string]];

The -setString: method takes a plain NSString. So you stripped out your formatting when calling it.
To put an NSAttributedString into an NSTextView, you replace the contents of its textStorage object (which is a special type of mutable attributed string):
	[[textView textStorage] setAttributedString: valueString];

—Jens_______________________________________________

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: 
 >NSAttributtedString initWithHTML skip styles (From: Gustavo Pizano <email@hidden>)

  • Prev by Date: Re: iPhone: badge icon for a button in toolbar
  • Next by Date: Copying CLHeading objects does not appear to work . . .
  • Previous by thread: Re: NSAttributtedString initWithHTML skip styles
  • Next by thread: iPhone: badge icon for a button in toolbar
  • Index(es):
    • Date
    • Thread