Re: Getting called back when an NSScrollView is scrolled
Re: Getting called back when an NSScrollView is scrolled
- Subject: Re: Getting called back when an NSScrollView is scrolled
- From: John Stiles <email@hidden>
- Date: Mon, 28 Jan 2008 10:41:07 -0800
For what it's worth, it looks like the technique of replacing the
target/action of the scroller does work beautifully.
However, it doesn't handle the scroll wheel. I suspect I could easily
handle that in an NSScrollView subclass which handles -scrollWheel:.
(Funny how the scroll wheel gets a method that can be simply subclassed,
but the actual scrollers don't! The design seems a little broken to me.)
John Stiles wrote:
It looks like this technique relies on bounds-changed notifications,
which is not quite the same thing as user-initiated scrolling.
I appreciate the link—I hadn't seen it!—but if at all possible I'd
prefer to actually know when the user has scrolled it, versus just
when the bounds have changed. It's really not the same thing. The user
resizing the window could cause a bounds change, for instance, and it
would be wrong if my code said "the scroll bar was clicked!" every
time the window changed size.
j o a r wrote:
On Jan 28, 2008, at 9:53 AM, John Stiles wrote:
Well, one goal is to get two scroll views to scroll in tandem—when
the user scrolls Scroll View A, another Scroll View B should match
its scroll. (They are next to one another so it looks like one big
view to the user.)
That is covered in the scroll view programming guide:
<http://developer.apple.com/documentation/Cocoa/Conceptual/NSScrollViewGuide/Articles/SynchroScroll.html>
...but perhaps you've tried the solution outlined there already?
j o a r
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden