[Q] availableTypeFromArray returns NXFileContentsPboardType instead of NSFileContentsPboardType
[Q] availableTypeFromArray returns NXFileContentsPboardType instead of NSFileContentsPboardType
- Subject: [Q] availableTypeFromArray returns NXFileContentsPboardType instead of NSFileContentsPboardType
- From: JongAm Park <email@hidden>
- Date: Thu, 18 Dec 2008 11:09:31 -0800
Hello, all.
I'm struggling to enable drag&dropping to Final Cut Pro's project window
from my application.
While I was trying to figure out how to, I found this strange thing.
NSArray *supportedTypes = [NSArray
arrayWithObject:NSFileContentsPboardType];
NSString *matchingType = [pboard availableTypeFromArray:supportedTypes];
if( [matchingType compare:@"NSFileContentsPboardType] == NSOrderedSame )
{
outputFileName = [NSString stringWithFormat:@"%@/Desktop/test.mov",
NSHomeDirectory()];
outputFileNameResult = [pboard
readFileContentsType:NSFileContentsPboardType toFile:outputFileName];
}
....
I expected that the matchingType returned by calling
availableTypeFromArray is @"NSFileContentsPboardType".
But, in fact, it returns @"NXFileContentsPboardType".
So, it doesn't reach the body of the if clause.
Is this a bug?
For other pboard types, it seems to return NS*PboardType, according to
this document.
http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSPasteboard_Class/Reference/Reference.html#//apple_ref/doc/uid/20000328-availableTypeFromArray_
_______________________________________________
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