On Wed, Dec 1, 2010 at 8:15 PM, Rick Mann <rm...@latencyzero.com> wrote: > > On Dec 1, 2010, at 20:14:09, Kyle Sluder wrote: > >> On Wed, Dec 1, 2010 at 7:19 PM, Rick Mann <rm...@latencyzero.com> wrote: >>> Cocoa. >>> >>> I have a view that shows the coordinates of the current mouse location in >>> it. I update this via -mouseMoved: But if the user scrolls the view with a >>> scroll ball, I don't get mouse moved events. >>> >>> 1) What's the best way to react to scroll changes? I'm currently observing >>> the NSViewBoundsDidChangeNotification. >> >> On which view? > > My view inside the scrollview.
Listen for bounds change notifications on the clip view (aka the scroll view's -contentView) instead. That's how scrolling actually works: the clip view changes its bounds origin and the regular view drawing machinery takes care of the rest by translating the document view's origin into the clip view's bounds coordinate system. --Kyle Sluder _______________________________________________ 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