• 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: Timothy Ritchey <email@hidden>
  • Date: Wed, 17 Apr 2002 08:24:28 -0500

I think the heat is getting to me. Is there a single complete thought in this e-mail?

I believe what I meant to say was: If you are subclassing a class that implements its own DnD, and simply want to hook into this functionality, you can override performDragOperation as I showed below. you may even want to check the return from the superclass to make sure it actually completed the drop. Otherwise, just ignore the call to super, and do whatever DnD magic you need.

Cheers,
tim

On Wednesday, April 17, 2002, at 08:04 AM, Timothy Ritchey wrote:

assuming you are implementing the DnD yourself... If you are subclassing a view that already implements DnD, just do:

- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
{
NSPoint location = [self convertPoint:[sender draggingLocation] fromView:nil];
return [super performDragOperation:sender];
}


or whatever your normal DnD code it.

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

How can i get the coordinates of where an object is dropped in a NSView?
_______________________________________________
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.
_______________________________________________
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.
_______________________________________________
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.

  • Follow-Ups:
    • Drawing to NSQuickDrawView
      • From: Ernst Persson <email@hidden>
References: 
 >Re: Drag and Drop in a NSView:Mouse coordinates (From: Timothy Ritchey <email@hidden>)

  • Prev by Date: Re: Crossing the NIB?
  • Next by Date: Drawing to NSQuickDrawView
  • Previous by thread: Re: Drag and Drop in a NSView:Mouse coordinates
  • Next by thread: Drawing to NSQuickDrawView
  • Index(es):
    • Date
    • Thread