Excellent! Thanks a lot, this works well for me too. I didn't know about the "CorePasteboardFlavorType" mechanism, and I couldn't find any documentation about it, so I suppose this isn't guaranteed to work in the future.
Best, Stefan Stephen F. Booth <[EMAIL PROTECTED]> wrote: > Stefan, > > I use the following code to get the URLs from dragged files from iTunes: > > NSString * const iTunesPboardType = @"CorePasteboardFlavorType 0x6974756E"; > > // Handle iTunes drops > else if([bestType isEqualToString:iTunesPboardType]) { > NSDictionary *iTunesDictionary = [[info draggingPasteboard] > propertyListForType:iTunesPboardType]; > NSArray *tracks = [iTunesDictionary valueForKey:@"Tracks"]; > NSEnumerator *enumerator = [tracks objectEnumerator]; > NSDictionary *track = nil; > NSURL *url = nil; > > while((track = [enumerator nextObject])) { > url = [NSURL URLWithString:[track valueForKey:@"Location"]]; > > if([url isFileURL]) > ; // Do something with URL > } > } > > Stephen -- Stefan Haller Berlin, Germany http://www.haller-berlin.de/ _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]