• 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
Re: cocoa-dev digest, Vol 1 #376 - 15 msgs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cocoa-dev digest, Vol 1 #376 - 15 msgs


  • Subject: Re: cocoa-dev digest, Vol 1 #376 - 15 msgs
  • From: David Adamson <email@hidden>
  • Date: Thu, 9 Aug 2001 09:51:02 -0400

if( [ fileType isEqualToString:@"NSFilesystemFileType" ] )
{
return YES;
}
return NO;

I don't know why filetype is empty, but I've seen it happen. Perhaps some things just don't have file types? Folders and Classic apps, for two examples, give you nothing, but Cocoa apps and RTF documents do.

But there's an error in the code quoted above that I ran into only yesterday, a simple not-paying-attention mistake. NSFilesystemFileType is a constant, the name of the NSString identifiying filesystem files and not the NSString itself. The actual NSString for NSApplicationFileType, for example, is @"app".

So you'd want

if( [ fileType isEqualToString:NSFilesystemFileType ] )
{
return YES;
}
return NO;

instead.

Cheers,
-David.


  • Prev by Date: Re: 'Buid fail' while linking files.
  • Next by Date: Re: Cocoa downgrade from openstep?
  • Previous by thread: Re: Newbie question about NIBs
  • Next by thread: Sherlock and my Sad Source Search Story
  • Index(es):
    • Date
    • Thread