Skip navigation.
 
mlRE: Emptying an NSTextView
FROM : Jonathan E. Jackel
DATE : Sat Nov 02 00:39:41 2002

What you want is [[yourTextView textStorage]
setAttributedString:yourEmptyAttributedString].  Text views have text
storage objects to keep track of their text.  A text storage object is a
subclass of NSMutableAttributedString.

Check out the programming topic on the text system architecture.


http://developer.apple.com/techpubs/macosx/Cocoa/TasksAndConcepts/Programmin
gTopics/TextArchitecture/index.html#//apple_ref/doc/uid/10000086i

Jonathan


> Hey Guys,
>
>     I've been messing around a bit attempting to empty an NSTextView in
> order to provide my users with a fresh start.  Unfortunately
> setStringValue does not work with this, and though setTextValue seems
> to be fine by the builder, it also isn't recognized at the time it
> needs to be invoked.  I was hoping that someone may have a simple
> answer to this problem which seems to be eluding me.
>
> Thanks guys.
>
> Chris Giddings
> President, Ripple Software, Ltd.
> http://www.ripplesw.com/
> <email_removed>
> _______________________________________________
> cocoa-dev mailing list | <email_removed>
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/cocoa-dev
> Do not post admin requests to the list. They will be ignored.

_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

Related mailsAuthorDate
mlEmptying an NSTextView Chris Giddings Nov 1, 23:50
mlRe: Emptying an NSTextView j o a r Nov 2, 00:15
mlRE: Emptying an NSTextView Jonathan E. Jackel Nov 2, 00:39
mlRE: Emptying an NSTextView Jonathan E. Jackel Nov 2, 00:45