Drag and drop problems!
Drag and drop problems!
- Subject: Drag and drop problems!
- From: Steve Gehrman <email@hidden>
- Date: Wed, 27 Jun 2001 02:42:10 -0700
When I drag and drop to my own application or another Cocoa application,
everything works great. When I drag and drop to iTunes or the Finder, I
have a problem.
When I select multiple items (muliple mp3 files, for example) in my
application,and try to drop them on iTunes, only the first item actually
gets dropped.
Here's my code... just sending an array of paths with
NSFilenamesPboardType
NSArray* tTypes;
NSMutableArray* pathsArray = [NSMutableArray array];
int i, cnt = [items count];
for (i=0;i<cnt;i++)
{
FileSystemItem *item = [items objectAtIndex:i];
[pathsArray addObject:[item path]];
}
tTypes = [NSArray arrayWithObjects:NSFilenamesPboardType, nil];
[pboard declareTypes: tTypes owner:nil];
[pboard setPropertyList: pathsArray forType: NSFilenamesPboardType];
steve