Re: TextView question
Re: TextView question
- Subject: Re: TextView question
- From: Douglas Davidson <email@hidden>
- Date: Tue, 15 Aug 2006 15:37:00 -0700
On Aug 11, 2006, at 10:33 AM, Jason Jasmin wrote:
I've tried the various options that have been presented so far, and
haven't seen a noticable performance difference. When doing all the
logic of adding my log message to the NSTextView, but without
calling scrollRangeToVisible:, it takes about 1ms per loop
iteration (as deduced by looking at the timestamps on my NSLog
calls in XCode). When I enable scrolling (either by calling
scrollRangeToVisible: directly, or by cancelling the previous
request as suggested by Andreas, it takes ~20ms per loop.
The approach that I believe several people have used successfully in
this case is to avoid calling scrollRangeToVisible: immediately, but
instead to call it only when layout is complete (as reported by
NSLayoutManager delegate methods).
For Leopard we have added options to NSLayoutManager that should make
this sort of workaround unnecessary. Those using Leopard can read
the AppKit release notes to find out more about this.
Douglas Davidson
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden