Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting called back when an NSScrollView is scrolled



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

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>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.