Not signed in (Sign In)

Vanilla 1.1.8 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthormonaj
    • CommentTimeJul 17th 2009
     
    I am trying to display an NSAttributedString in a NSTextView object by using this method:
    [textViewobject insertText:attributedString];

    but it is not displaying anything

    Can anyone suggest me how to accomplish it?
    • CommentAuthoriluvcapra
    • CommentTimeJul 17th 2009
     

    As correct as that seems, that's not the way you're supposed to change the content of an NSTextView programmatically. To change the content of a textview in code, you manipulate the view's text storage.

     
     
    [[textViewobject textStorage] setAttributedString:attributedString];
     
     

    • CommentAuthormonaj
    • CommentTimeJul 19th 2009 edited
     
    Thanks, a lot ! it worked :)