On 22 May '08, at 9:34 PM, [EMAIL PROTECTED] 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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to