Re: File path from image drag and drop
Re: File path from image drag and drop
- Subject: Re: File path from image drag and drop
- From: David Remahl <email@hidden>
- Date: Mon, 27 May 2002 15:22:16 +0200
>
Hi everyone,
>
>
Just wondering if anyone knows how to get the filepath from an image dragged
>
from the desktop to an NSImageView. I have been trying to find a path back but
>
no luck yet. That info does not seem to be in the NSDraggingInfo nor the
>
NSImage nor the NSImageView. Not sure where else to look/ intercept the info.
>
Thanks in advance for any hints.
>
>
Brian
You will have to override the NSImageView and reimplement the dragging
support. It works fine in an app of mine.
Documentation for dragging support is in among other places in NSView.html.
Bear in mind that the drag may not be represented by a file on disk - it may
be an image (tiff data) - so register for filename pb type, but also
register for pure image drops and anticipate them in your acceptance
methods.
/ David
_______________________________________________
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.