• 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-Initializing (clearing) a NSTextView object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re-Initializing (clearing) a NSTextView object


  • Subject: Re-Initializing (clearing) a NSTextView object
  • From: "Frederick C. Lee" <email@hidden>
  • Date: Fri, 11 Jun 2004 16:13:01 -0700

Simple question:

How do I clear a NSTextView object?

Do I:
a) Do a replace characters within the range of the NSTextView object as
in:

[[self notesView] replaceCharactersInRange:NSMakeRange(0, [[[self
notesView] string] length])....with NIL or blank chars.

or

b) set its respective NSTextStorage to nil?

I'm sure there must be a very simple method of clearing (resetting) the
view; but I'm not sure what's the correct way of doing it.

Thanks in advance.

Regards,

Ric.
_______________________________________________
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.


  • Follow-Ups:
    • Re: Re-Initializing (clearing) a NSTextView object
      • From: Aaron Tuller <email@hidden>
  • Prev by Date: Re: Rasterizing an NSString to a bitmap
  • Next by Date: Re: Transparent Images on Buttons in Jaguar?
  • Previous by thread: Re: NSString initWithCharactersNoCopy
  • Next by thread: Re: Re-Initializing (clearing) a NSTextView object
  • Index(es):
    • Date
    • Thread