Re: Drag and Drop in a NSView:Mouse coordinates
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.