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 protected]) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
