• 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
Getting called back when an NSScrollView is scrolled
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting called back when an NSScrollView is scrolled


  • Subject: Getting called back when an NSScrollView is scrolled
  • From: John Stiles <email@hidden>
  • Date: Mon, 28 Jan 2008 09:33:01 -0800

I'd like to get a message sent to my app whenever the user scrolls a particular NSScrollView around.
There's a method which is close to what I want:


   - (void)reflectScrolledClipView:(NSClipView *)aClipView

But according to the docs, this can sometimes get called in cases where the user didn't actually scroll (e.g. the view was resized or something). I need to know that it was a user-initiated scrolling action.

In the past, I cheated and made an NSTimer which polled the scroll bar position, but I'm thinking there's got to be a cleaner way than that.

I am wondering if it would be safe to change the target and action on the NSScrollView's scrollers to point to a custom selector of mine (which would call through to the original action before doing my extra work). Technically this is fraught with peril because the NSScrollView could change the target/action back at any time, but I am thinking that pragmatically this is unlikely to actually occur.

_______________________________________________

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


  • Follow-Ups:
    • Re: Getting called back when an NSScrollView is scrolled
      • From: "Kyle Sluder" <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>)

  • Prev by Date: Re: Running process as root from Cocoa
  • Next by Date: Re: Getting called back when an NSScrollView is scrolled
  • Previous by thread: Re: Running process as root from Cocoa
  • Next by thread: Re: Getting called back when an NSScrollView is scrolled
  • Index(es):
    • Date
    • Thread