NSDragOperationDelete problems with Finder
NSDragOperationDelete problems with Finder
- Subject: NSDragOperationDelete problems with Finder
- From: Steve Gehrman <email@hidden>
- Date: Sun, 6 Oct 2002 17:55:11 -0700
I have an NSView that acts like the docks trash can.
I am returning NSDragOperationDelete using the standard
NSDraggingDestination methods.
In my application, I can drag an item to this view or the Dock's trash
and I get the correct behavior. My draggedImage method gets called and
I move the file to the trash.
- (void)draggedImage:(NSImage *)anImage endedAt:(NSPoint)aPoint
operation:(NSDragOperation)operation
{
if (operation == NSDragOperationDelete)
{
[self moveToTrash];
}
}
The problem is that if I drag a file from the Finder, the Finder does
nothing. The Finder should do something similar to my draggedImage call
and see that the drag operation is NSDragOperationDelete and move the
file to the trash.
Why doesn't the Finder work?
Here's a snippet of my trash view....
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)info;
{
return NSDragOperationDelete;
}
- (NSDragOperation)draggingUpdated:(id <NSDraggingInfo>)info;
{
return NSDragOperationDelete;
}
- (BOOL)performDragOperation:(id <NSDraggingInfo>)info;
{
// NSDragOperationDelete is handled by the dragging source
return YES;
}
_______________________________________________
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.