• 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: Mouse Dragging in Apple Sketch
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mouse Dragging in Apple Sketch


  • Subject: Re: Mouse Dragging in Apple Sketch
  • From: Scott Anguish <email@hidden>
  • Date: Sun, 21 Oct 2007 03:36:26 -0400


On Oct 21, 2007, at 12:09 AM, Fritz Anderson wrote:

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.


The View Programming Guide for Cocoa covers this.

http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaViewsGuide/SubclassingNSView/chapter_5_section_4.html#/ /apple_ref/doc/uid/TP40002978-CH7-DontLinkElementID_19

This is no longer a recommended way to handle dragging. Provide the mouseXXX: methods.

Actually, both techniques are valid. It depends on the situation. The doc covers both cases, and discusses the differences/advantages.



_______________________________________________

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: 
 >Mouse Dragging in Apple Sketch (From: Richard Somers <email@hidden>)
 >Re: Mouse Dragging in Apple Sketch (From: Fritz Anderson <email@hidden>)

  • Prev by Date: Re: Best design pattern for un-archiving instances of shared resources?
  • Next by Date: Re: revisiting NSTableView 'on drag' row highlighting
  • Previous by thread: Re: Mouse Dragging in Apple Sketch
  • Next by thread: Best working hours model to use with Bindings
  • Index(es):
    • Date
    • Thread