Re: Re-Initializing (clearing) a NSTextView object
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.