How to drag file promises from IKImageBrowserView?
How to drag file promises from IKImageBrowserView?
- Subject: How to drag file promises from IKImageBrowserView?
- From: Matt Rajca <email@hidden>
- Date: Wed, 29 Jul 2009 15:33:06 -0500
Hi!
I'm using IKImageBrowserView to display a collection files that reside
on Bluetooth devices. From the documentation, it looks like the only
method you have to override to support dragging is:
- (NSUInteger)imageBrowser:(IKImageBrowserView *)aBrowser
writeItemsAtIndexes:(NSIndexSet *)itemIndexes toPasteboard:
(NSPasteboard *)pasteboard
I can't seem to be able to get the Finder to accept file promises
placed on the dragging pasteboard from IKImageBrowserView. Here is my
code:
- (NSUInteger)imageBrowser:(IKImageBrowserView *)aBrowser
writeItemsAtIndexes:(NSIndexSet *)itemIndexes toPasteboard:
(NSPasteboard *)pasteboard {
NSArray *fileExtensions ... ; // Get extensions of the dragged files
[pasteboard declareTypes:[NSArray
arrayWithObject:NSFilesPromisePboardType] owner:self];
[pasteboard setPropertyList:fileExtensions
forType:NSFilesPromisePboardType];
return [fileExtensions count];
}
Is there any way to support the dragging of file promises from
IKImageBrowserView so I could later save the actual data to disk
asynchronously?
Thanks,
Matt
_______________________________________________
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