• 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: Weird scrolling thing in Lion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Weird scrolling thing in Lion


  • Subject: Re: Weird scrolling thing in Lion
  • From: Graham Cox <email@hidden>
  • Date: Wed, 04 Apr 2012 15:37:57 +1000

On 04/04/2012, at 11:49 AM, James Maxwell wrote:

> Ah, found it in DrawKit -- DKViewController, [view stopAutoScrolling].
> Thanks Graham! ;-)
>
> (weird that I didn't need this before…)
>
> J.


Autoscrolling is performed by a timer, so that it happens smoothly as long as the mouse is at the edges of the scroll view. When the mouse goes down, the timer starts,and when the mouse goes up, it stops.

If you have swallowed the mouse-up, you need to stop the timer yourself, or scrolling will continue when the mouse is outside of the view, even though you're not dragging. -stopAutoScrolling will do that.

One reason you may have swallowed the mouseUp is that you implemented your own event loop called from mouseDown. If you do this, you might need to be careful about cleaning up after yourself, because DK does not generally expect (or need) you to do that. However, it does do this itself when creating new path objects, so it's not unheard of. One way I deal with this is to post a fake mouseUp when I'm done, then the normal processing takes care of the standard clean-up.

--Graham



_______________________________________________

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: 
 >Weird scrolling thing in Lion (From: James Maxwell <email@hidden>)
 >Re: Weird scrolling thing in Lion (From: James Maxwell <email@hidden>)

  • Prev by Date: Using NSView fullscreen mode vs. autolayout constraints
  • Next by Date: Re: Crash in NSBitmapImageRep representationUsingType: NSPNGFileType for 8-bit grayscale
  • Previous by thread: Re: Weird scrolling thing in Lion
  • Next by thread: Using NSView fullscreen mode vs. autolayout constraints
  • Index(es):
    • Date
    • Thread