Odd NSScroller behavior when clicking page dec/inc areas
Odd NSScroller behavior when clicking page dec/inc areas
- Subject: Odd NSScroller behavior when clicking page dec/inc areas
- From: Steve Mills <email@hidden>
- Date: Fri, 13 Sep 2013 13:14:13 -0500
We have a scroll view whose horizontal scroller needs to work in a different mode sometimes (same mode that my previous scroll view problem is in). We set the scroller's target and action so we can control the size and position of the thumb via "[scroller setKnobProportion:proportion]" and "scroller.doubleValue = pos" respectively. Here's the problem:
First I click and hold in the page-right area for a while to move the thumb to the right. Then I click and hold in the page-left area to go back to the left. Here's where the bug happens. The first page-left will cause a page-left (correct), but all actions after that will cause a page-right (not at all correct). Our action method asks the scroller for the hitPart. It returns NSScrollerDecrementPage correctly for the initial mouseDown, but then returns NSScrollerIncrementPage as the mouse is held down, and the mouse is still clearly to the left of the thumb after we're repositioned it via setting scroller.doubleValue.
If I grab the mouse position from the window and convert it to the coords of the scroller, then ask the scroller to testPart that point, it returns the correct part, which is *different* than hitPart.
What's up here? It sure smells like a bug.
--
Steve Mills
office: 952-818-3871
home: 952-401-6255
cell: 612-803-6157
_______________________________________________
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