Changed CogUrlsPbboardType to CogUrlsPboardType throughout project

CQTexperiment
matthewleon 2008-02-13 17:14:19 +00:00
parent 037874d654
commit 3c712e2e45
5 changed files with 10 additions and 10 deletions

View File

@ -74,8 +74,8 @@
[urls addObject:[p url]];
}
NSLog(@"URLS: %@", urls);
[pboard declareTypes:[NSArray arrayWithObjects:CogUrlsPbboardType,nil] owner:nil]; //add it to pboard
[pboard setData:[NSArchiver archivedDataWithRootObject:urls] forType:CogUrlsPbboardType];
[pboard declareTypes:[NSArray arrayWithObjects:CogUrlsPboardType,nil] owner:nil]; //add it to pboard
[pboard setData:[NSArchiver archivedDataWithRootObject:urls] forType:CogUrlsPboardType];
return YES;
}

View File

@ -2,7 +2,7 @@
#import <Cocoa/Cocoa.h>
extern NSString *MovedRowsType;
extern NSString *CogUrlsPbboardType;
extern NSString *CogUrlsPboardType;
extern NSString *iTunesDropType;
@interface DNDArrayController : NSArrayController

View File

@ -4,7 +4,7 @@
@implementation DNDArrayController
NSString *MovedRowsType = @"MOVED_ROWS_TYPE";
NSString *CogUrlsPbboardType = @"COG_URLS_TYPE";
NSString *CogUrlsPboardType = @"COG_URLS_TYPE";
// @"CorePasteboardFlavorType 0x6974756E" is the "itun" type representing an iTunes plist
NSString *iTunesDropType = @"CorePasteboardFlavorType 0x6974756E";
@ -12,7 +12,7 @@ NSString *iTunesDropType = @"CorePasteboardFlavorType 0x6974756E";
- (void)awakeFromNib
{
// register for drag and drop
[tableView registerForDraggedTypes:[NSArray arrayWithObjects:MovedRowsType, CogUrlsPbboardType, NSFilenamesPboardType, iTunesDropType, nil]];
[tableView registerForDraggedTypes:[NSArray arrayWithObjects:MovedRowsType, CogUrlsPboardType, NSFilenamesPboardType, iTunesDropType, nil]];
}

View File

@ -84,13 +84,13 @@
row = 0;
// Determine the type of object that was dropped
NSArray *supportedtypes = [NSArray arrayWithObjects:CogUrlsPbboardType, NSFilenamesPboardType, iTunesDropType, nil];
NSArray *supportedtypes = [NSArray arrayWithObjects:CogUrlsPboardType, NSFilenamesPboardType, iTunesDropType, nil];
NSPasteboard *pboard = [info draggingPasteboard];
NSString *bestType = [pboard availableTypeFromArray:supportedtypes];
// Get files from an file drawer drop
if ([bestType isEqualToString:CogUrlsPbboardType]) {
NSArray *urls = [NSUnarchiver unarchiveObjectWithData:[[info draggingPasteboard] dataForType:CogUrlsPbboardType]];
if ([bestType isEqualToString:CogUrlsPboardType]) {
NSArray *urls = [NSUnarchiver unarchiveObjectWithData:[[info draggingPasteboard] dataForType:CogUrlsPboardType]];
NSLog(@"URLS: %@", urls);
[playlistLoader insertURLs: urls atIndex:row sort:YES];
}

View File

@ -18,8 +18,8 @@
[spotlightSearchController.query disableUpdates];
NSArray *urls = [[self selectedObjects]valueForKey:@"url"];
[pboard declareTypes:[NSArray arrayWithObjects:CogUrlsPbboardType,nil] owner:nil]; //add it to pboard
[pboard setData:[NSArchiver archivedDataWithRootObject:urls] forType:CogUrlsPbboardType];
[pboard declareTypes:[NSArray arrayWithObjects:CogUrlsPboardType,nil] owner:nil]; //add it to pboard
[pboard setData:[NSArchiver archivedDataWithRootObject:urls] forType:CogUrlsPboardType];
[spotlightSearchController.query enableUpdates];