Re: Scrolling Behavior of NSTextView

2010-06-08 Thread Paul Sanders
Martin, I tried the [NSTextView scrollRangeToVisible:] with NSMakeRange(0,0) , but it is the same as to use [scrollPoint:] solely. Only with [glyphRangeForTextContainer:] in prior the scroll-to-top works. I don't think it is the problem of coordinate system flip-ness, because when using

Scrolling Behavior of NSTextView

2010-06-07 Thread Dong Feng
I encountered a wired behavior of NSTextView. I tried to use the following statement to scroll to top: [[_scrollView documentView] scrollPoint:NSMakePoint(0, 0)]; where the *documentView* is a NSTextView. But it seems when the window is in certain size, the scroll-to-top behavior does not take

Re: Scrolling Behavior of NSTextView

2010-06-07 Thread Paul Sanders
I encountered a wired behavior of NSTextView. I tried to use the following statement to scroll to top: [[_scrollView documentView] scrollPoint:NSMakePoint(0, 0)]; where the *documentView* is a NSTextView. But it seems when the window is in certain size, the scroll-to-top behavior does not

Re: Scrolling Behavior of NSTextView

2010-06-07 Thread Martin Wierschin
I encountered a wired behavior of NSTextView. I tried to use the following statement to scroll to top: [[_scrollView documentView] scrollPoint:NSMakePoint(0, 0)]; where the *documentView* is a NSTextView. But it seems when the window is in certain size, the scroll-to-top behavior does not

Re: Scrolling Behavior of NSTextView

2010-06-07 Thread Martin Wierschin
On 2010.06.07, at 2:10 PM, Paul Sanders wrote: I encountered a wired behavior of NSTextView. I tried to use the following statement to scroll to top: [[_scrollView documentView] scrollPoint:NSMakePoint(0, 0)]; where the *documentView* is a NSTextView. But it seems when the window is in

Re: Scrolling Behavior of NSTextView

2010-06-07 Thread Dong Feng
Thanks for all your replies, Martin and Paul. Martin, I tried the [NSTextView scrollRangeToVisible:] with NSMakeRange(0,0) , but it is the same as to use [scrollPoint:] solely. Only with [glyphRangeForTextContainer:] in prior the scroll-to-top works. I don't think it is the problem of coordinate