Re: Drag and drop display image and file path?
Re: Drag and drop display image and file path?
- Subject: Re: Drag and drop display image and file path?
- From: Uli Kusterer <email@hidden>
- Date: Wed, 22 Apr 2009 09:30:37 +0200
On 22.04.2009, at 00:03, Henrietta Read wrote:
NSArray *files = [pboard propertyListForType:NSTIFFPboardType];
[self setImage:[files objectAtIndex:0]];
This is probably your mistake. setImage expects an NSImage*. Whatever
is on the pasteboard in that array you have, it's unlikely to be an
NSImage. AFAIK NSTIFFPboardType is an NSData containing raw TIFF data,
so you'll probably have to create an NSImage from that or something
like that.
Mind you, that's from memory, I might be misremembering this
pasteboard flavour.
Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden