RE: Emptying an NSTextView
RE: Emptying an NSTextView
- Subject: RE: Emptying an NSTextView
- From: "Jonathan E. Jackel" <email@hidden>
- Date: Fri, 1 Nov 2002 18:39:41 -0500
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@hidden
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
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@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.