Re: NSAttributtedString initWithHTML skip styles
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