• 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: Autoscrolling in NSDraggingDestination
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Autoscrolling in NSDraggingDestination


  • Subject: Re: Autoscrolling in NSDraggingDestination
  • From: Kyle Sluder <email@hidden>
  • Date: Wed, 06 Feb 2013 10:24:04 -0800

On Tue, Feb 5, 2013, at 10:45 PM, Kyle Sluder wrote:
> Typically one calls +startPeriodicEvents… in -draggingEntered:, and calls
> +stopPeriodicEvents in -draggingExited:.

Hmm, I think I'm conflating -wantsPeriodicDraggingUpdates with +[NSEvent
startPeriodicEvents…]. There are places in our code where we begin
period events in response to a mouse drag, but I bet it's for _non-drag
manager_ dragging.

You can actually two different behaviors in OmniGraffle:

1. If you just regular-drag an object, we autoscroll even if you drag
the mouse outside the view's visible rect (and indeed, outside of the
window). This is obviously not a drag-manager drag. I haven't looked at
the source, but we could be using periodic events here, or using a timer
(both of which involve running the runloop manually within the mouse
movement).

2. If you option-drag an object, we start a drag-manager drag that lets
you clone the object on the canvas _or_ drag it to another
canvas/application. We stop autoscrolling when the mouse leaves the
view's visible rect. This seems like the behavior you _don't_ want.

If your dragging source and autoscrolling destination are the same
object, you could put your autoscroll logic into the source methods
instead of the destination methods. But if you're trying for parity with
other system components, note that Finder stops autoscrolling as soon as
the mouse leaves the view's visible rect.

--Kyle Sluder

_______________________________________________

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: 
 >Autoscrolling in NSDraggingDestination (From: Graham Cox <email@hidden>)
 >Re: Autoscrolling in NSDraggingDestination (From: Kyle Sluder <email@hidden>)
 >Re: Autoscrolling in NSDraggingDestination (From: Graham Cox <email@hidden>)
 >Re: Autoscrolling in NSDraggingDestination (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: Close box not showing as dirty when the doc says it's dirty
  • Next by Date: Re: Strange Problem Printing Multiple NSTextViews
  • Previous by thread: Re: Autoscrolling in NSDraggingDestination
  • Next by thread: Conversion of QTCaptureDecompressedVideoOutput frame to YUV420p
  • Index(es):
    • Date
    • Thread