Re: NSTExtView
Re: NSTExtView
- Subject: Re: NSTExtView
- From: Jens Alfke <email@hidden>
- Date: Fri, 23 May 2008 08:11:17 -0700
On 22 May '08, at 9:34 PM, email@hidden wrote:
I hope you could understand my question,
You didn't understand my answer, unfortunately. But at least you've
finally posted enough information that I can see what's going on.
NSStrings don't have any formatting, of course, just plain characters.
When you initiaze your NSAttributedString using -initWithString:, all
it gets is the plain characters of your text, not any of the formatting.
So what you have is an unformatted NSAttributedString. That's why you
don't get any style tags. (You only get the <font> tags because AppKit
assumes Helvetica is the default font.)
You need to create the attributed string in some way that won't lose
all the formatting. What you probably want is to simply use the
NSTextView's textStorage, which is an attributed string. Or if it's an
NSTextField, call -attributedStringValue on it.
—Jens
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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