• 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: empty string, or: totally clearing the NSTextStorage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
  • Follow-Ups:
    • Re: empty string, or: totally clearing the NSTextStorage
      • From: Arthur Clemens <email@hidden>
References: 
 >empty string, or: totally clearing the NSTextStorage (From: Arthur Clemens <email@hidden>)

  • Prev by Date: Re: Declarations near usage
  • Next by Date: Re: Declarations near usage
  • Previous by thread: Re: empty string, or: totally clearing the NSTextStorage
  • Next by thread: Re: empty string, or: totally clearing the NSTextStorage
  • Index(es):
    • Date
    • Thread