Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Monaj

macrumors regular
Original poster
May 24, 2009
193
0
I am trying to display an NSAttributedString in a NSTextView object by using this method:
[textViewobject insertText:attributedString];

but it is not displaying anything :eek:

Can anyone suggest me how to accomplish it?
 
From the docs:
This method is the entry point for inserting text typed by the user and is generally not suitable for other purposes.​

I'd suggest using the associated NSTextStorage object instead which you can get via textStorage.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.