My code example is :
In awakeFromNib
NSString *quicktimeFileNamesPboardType = NSCreateFilenamePboardType(@"mov");
[myNSTableView registerForDraggedTypes:[NSArray arryWithObject:quickTimeFileNamesPboardType]];
In -tableView:writeRowsWithIndexes:toPasteboard:
NSString *quicktimeFileNamesPboardType = NSCreateFilenamePboardType(@"mov");
anIndex = [selectedRowsIndexSet firstIndex];
while( anIndex != NSNotFound )
{
fileName = [NSString stringWithFormat:@"%@/%@.mov", configPath, [[dataArray objectAtIndex:anIndex] name]];
[fileNamesArray addObject:fileName];
// Next index
anIndex = [selectedRowIndexSet indexGreaterThanIndex:anIndex];
}
[pboard declareTypes:[NSArray arrayWithObjects:quicktimeFilenamesPboardType, nil] owner:nil];
isSuccessful = [pboard setPropertyList:fileNamesArray forType:quicktimeFilenamesPboardType];
...
When I check what information is exported from my program with the
Drag Peeker X, it shows :
Item Reference: 19884c10
Item Bounds (tlbr): { 86, 1, 104, 191 }
Number of flavors: 0
Strangely, it doesn't have any flavor of data.
Is there anything wrong how I use the NSCreateNSFilenamePboardType?
How to use it properly?
Thank you in advance.
P.S. By the way, is it normal to put 'furl' and 'hfs' flavor when
NSFilenamesPboardType is used? Because an array of file names are added
to the pasteboard, I thought that only file name strings were added.
But it turned out no-so-true.
JongAm Park wrote: