Re: NSTextView scrolling problem...
Re: NSTextView scrolling problem...
- Subject: Re: NSTextView scrolling problem...
- From: Mike Masukawa <email@hidden>
- Date: Mon, 9 Dec 2002 07:33:45 -0800
I use length-1 and it seems to work everytime.
On Monday, December 9, 2002, at 07:13 AM, Nico wrote:
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.
_______________________________________________
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.