• 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
NSTextView scrolling problem...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTextView scrolling problem...


  • Subject: NSTextView scrolling problem...
  • From: Nico <email@hidden>
  • Date: Mon, 9 Dec 2002 16:13:28 +0100

Hi there.

I've got a subclass of NSTextView in a document inside a doc-based app.
As I append some text to this NSTextView very often, I need the end of the textview to be visible everytime.
For that, at the end the method called (in the subclass) to add text to the textview, I call :
[self scrollRangeToVisible:NSMakeRange([[[self textStorage] string] length], 0)];

or even
[self scrollRangeToVisible:NSMakeRange([[self string] length], 0)];

(The method containing this line is called dozens time a second and contains a few lines colorizing and parsing the text).

Whatever, sometimes, very randomly, I'd say 5% of the time, I got an error message :
'NSRangeException' (reason '*** NSRunStorage, _NSBlockNumberForIndex(): index (25436) beyond array bounds (24954)')

and the debugger pauses the app, showing me the line above......

What's the problem over there ?
Any help is very appreciated !

Nico.
_______________________________________________
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: NSTextView scrolling problem...
      • From: Mike Ferris <email@hidden>
    • Re: NSTextView scrolling problem...
      • From: Mike Masukawa <email@hidden>
  • Prev by Date: Remove Keychain
  • Next by Date: Re: NSTextView scrolling problem...
  • Previous by thread: Remove Keychain
  • Next by thread: Re: NSTextView scrolling problem...
  • Index(es):
    • Date
    • Thread