NSTextView scrolling problem...
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.