• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Getting called back when an NSScrollView is scrolled
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Running process as root from Cocoa (From: "Mitchell Hashimoto" <email@hidden>)
 >Re: Running process as root from Cocoa (From: "Hamish Allan" <email@hidden>)
 >Getting called back when an NSScrollView is scrolled (From: John Stiles <email@hidden>)
 >Re: Getting called back when an NSScrollView is scrolled (From: "Kyle Sluder" <email@hidden>)
 >Re: Getting called back when an NSScrollView is scrolled (From: John Stiles <email@hidden>)
 >Re: Getting called back when an NSScrollView is scrolled (From: j o a r <email@hidden>)
 >Re: Getting called back when an NSScrollView is scrolled (From: John Stiles <email@hidden>)

  • Prev by Date: Re: The mouse is where, again?
  • Next by Date: Re: Can't get a Parent-Child CoreData relationship working
  • Previous by thread: Re: Getting called back when an NSScrollView is scrolled
  • Next by thread: Re: Getting called back when an NSScrollView is scrolled
  • Index(es):
    • Date
    • Thread