• 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: NSHFSTypeCodeFromFileType() == 0?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSHFSTypeCodeFromFileType() == 0?


  • Subject: Re: NSHFSTypeCodeFromFileType() == 0?
  • From: Glenn Andreas <email@hidden>
  • Date: Tue, 24 Feb 2004 11:35:27 -0600

OK, so now that I've been enlightened as to how HFS file types are handled by Cocoa, I've tried to do The Right Thing and be consistent in how I'm using them, by incorporating the functions in NSHFSFileTypes.h.

Problem: "OSType NSHFSTypeCodeFromFileType(NSString *fileTypeString);" always returns 0 (zero). I've tried feeding it several different values in several different way, and always get the same result: 0 (zero).

OSType creator = NSHFSTypeCodeFromFileType([NSString stringWithString:@"asdf"]);
OSType creator = NSHFSTypeCodeFromFileType(@"asdf");
NSString *type = @"asdf";
OSType creator = NSHFSTypeCodeFromFileType(type);

In all cases, creator = 0 (zero).

Try NSHFSTypeCodeFromFileType(@"'asdf'")
(with the single quotes around the creator characters).

See <http://developer.apple.com/documentation/Cocoa/Conceptual/Documents/Tasks/SavingHFSTypeCodes.html> an example of using NSHFSTypeCodeFromFileType.


--
Glenn Andreas email@hidden mondo blobbo, Cythera, Theldrow, oh my!
Mad, Bad, and Dangerous to Know
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
References: 
 >NSHFSTypeCodeFromFileType() == 0? (From: Randall Meadows <email@hidden>)

  • Prev by Date: Re: Unwanted clip of rotated text
  • Next by Date: Check for 10.2 incompatibilities in XCode
  • Previous by thread: NSHFSTypeCodeFromFileType() == 0?
  • Next by thread: Re: NSHFSTypeCodeFromFileType() == 0?
  • Index(es):
    • Date
    • Thread