• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
[Q] availableTypeFromArray returns NXFileContentsPboardType instead of NSFileContentsPboardType
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[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


  • Follow-Ups:
    • Re: [Q] availableTypeFromArray returns NXFileContentsPboardType instead of NSFileContentsPboardType
      • From: "Michael Ash" <email@hidden>
  • Prev by Date: Re: a few Core Data questions: Predicates and document based app
  • Next by Date: Re: Enabling add button
  • Previous by thread: Re: Enabling add button
  • Next by thread: Re: [Q] availableTypeFromArray returns NXFileContentsPboardType instead of NSFileContentsPboardType
  • Index(es):
    • Date
    • Thread