• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: Emptying an NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Emptying an NSTextView (From: Chris Giddings <email@hidden>)

  • Prev by Date: class method list
  • Next by Date: RE: Emptying an NSTextView
  • Previous by thread: RE: Emptying an NSTextView
  • Next by thread: -selectedRow incorrect when NSTableView is being edited?
  • Index(es):
    • Date
    • Thread