Re: Mouse Dragging in Apple Sketch
Re: Mouse Dragging in Apple Sketch
- Subject: Re: Mouse Dragging in Apple Sketch
- From: Fritz Anderson <email@hidden>
- Date: Sat, 20 Oct 2007 23:09:36 -0500
On 20 Oct 2007, at 10:20 PM, Richard Somers wrote:
Apple provides a sample application called Sketch found in the
AppKit folder. In the SKTGraphicView.m file there is a single mouse
related method mouseDown:. There are no mouseDragged:, mouseUp:, or
mouseMoved: methods.
My question is how does this application get information on a mouse
dragged operation? The dragging functionality works but I can not
see how or where this is implemented in the code.
Read the code more carefully.
Examine the call tree
mouseDown:
selectAndTrackMouseWithEvent:
resizeGraphic:usingHandle:withEvent:
moveSelectedGraphicsWithEvent:
marqueeSelectWithEvent:
In all the methods below mouseDown:, the view goes into a tight loop,
collecting events until the left mouse button goes up, and responding
to them. The other mouseXXX: methods are not provided, because
mouseDown: handles the events in-line.
This is no longer a recommended way to handle dragging. Provide the
mouseXXX: methods.
— F
_______________________________________________
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