• 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: Drag and Drop in a NSView:Mouse coordinates
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drag and Drop in a NSView:Mouse coordinates


  • Subject: Re: Drag and Drop in a NSView:Mouse coordinates
  • From: "John C. Randolph" <email@hidden>
  • Date: Wed, 17 Apr 2002 12:37:05 -0700

On Wednesday, April 17, 2002, at 04:57 AM,
email@hidden wrote:

> How can i get the coordinates of where an object is dropped in
> a NSView?

The sender of any of the methods in the NSDraggingDestination
protocol conforms to NSDraggingInfo, so...

- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
{
NSPoint where = [sender draggingLocation];
NSLog(@"dragging concluded at (%d, %d)", where.x, where.y);
}

John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Drag and Drop in a NSView:Mouse coordinates (From: email@hidden)

  • Prev by Date: Re: Hello, a book recommendation request, and a question
  • Next by Date: toggleToolbarShown and titlebar widget
  • Previous by thread: Drawing to NSQuickDrawView
  • Next by thread: [ANN] Cocoa Browser ver 0.3
  • Index(es):
    • Date
    • Thread