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

Re: Re-Initializing (clearing) a NSTextView object


  • Subject: Re: Re-Initializing (clearing) a NSTextView object
  • From: Aaron Tuller <email@hidden>
  • Date: Fri, 11 Jun 2004 16:39:22 -0700

How about:

[[self notesView] setString:@""];

-aaron

At 4:13 PM -0700 6/11/04, Frederick C. Lee wrote:
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.


References: 
 >Re-Initializing (clearing) a NSTextView object (From: "Frederick C. Lee" <email@hidden>)

  • Prev by Date: Smooth Animation
  • Next by Date: NSIndexSet question
  • Previous by thread: Re-Initializing (clearing) a NSTextView object
  • Next by thread: Smooth Animation
  • Index(es):
    • Date
    • Thread