Re: empty string, or: totally clearing the NSTextStorage
Re: empty string, or: totally clearing the NSTextStorage
- Subject: Re: empty string, or: totally clearing the NSTextStorage
- From: Ondra Cada <email@hidden>
- Date: Thu, 17 Oct 2002 12:34:11 +0200
On Wednesday, October 16, 2002, at 11:32 , Arthur Clemens wrote:
I have a peculiar problem: I want to clear my textStorage, but I don't
succeed in clearing it totally - there remains
an empty newline, using this code:
(in my textView)
unsigned length = [[self textStorage] length];
[[self textStorage] replaceCharactersInRange:NSMakeRange(0, length-1)
withString:@""];
Using "length-1" you keep there the last character, whatever it is. It
happens to be a newline.
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
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.