There was some discussion here about a month ago about the
NSScrollView "scrollpoint:" method not working; I am encountering
a similar phenomenon and was wondering if anyone had come up 
with a solution, or provided an answer to the original poster
off list, or if my new information might provide a useful hint:

I have an NSScrollView instance created with Interface Builder
3.2.2.  (I did upgrade to 3.2.3 for a bit, but hit enough bugs
with Xcode 3.2.3 that I deinstalled.)  I am trying to set the
scroll position programatically, via "scrollpoint:".  I have
done enough NSLog investigation to be confident that the scrollpoint
I have has reasonable values.  The actual code is based on the
example for program-controlled scrolling in the documentation, and
goes like this:

  NSPoint scrollerOrigin = [[<an NSScrollView> contentView] bounds].origin;

Then, later:

  [[<the same NSScrollView> documentView] scrollPoint:scrollerOrigin];

And no scrolling takes place.

I have also tried sending "scrollRectToVisible:" to the document view
itself, hence presumably up to the enclosing NSClipView, with no 
effect.

I can use "scrollRangeToVisible:", and that *does* work, but
that's not quite what I want.

I tried calling "displayIfNeeded:" on the NSScrollView just before
"scrollpoint:", as suggested in the previous discussion, but to no
effect.

My document view is a subclass of NSTextView, but I do not override
any of these methods in it.

And I have nosed about on the web a bit, looking for similar problems.

Any suggestions?

--  Jay Reynolds Freeman
---------------------
jay_reynolds_free...@mac.com
http://web.mac.com/jay_reynolds_freeman (personal web site)


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to