• 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
typeFromFileExtension in Leopard SDK
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

typeFromFileExtension in Leopard SDK


  • Subject: typeFromFileExtension in Leopard SDK
  • From: Eric Slosser <email@hidden>
  • Date: Mon, 13 Apr 2009 17:15:25 -0400

When I switched my SDKROOT from 10.4 to 10.5, my calls to - [NSDocumentController typeFromFileExtension:] started returning nil.

- with Xcode 3.1.1 on Leopard 10.5.6
- make a new Cocoa NSDocument app
- in the target info window, properties pane, assign a document type, giving it
name: my doc
UTI: com.comp.app.doc1
extensions: doc1
- in MyDocument.m, windowControllerDidLoadNib, throw in:
NSString* t = [[NSDocumentController sharedDocumentController] typeFromFileExtension:@"doc1"];
NSLog(@"filetype = %@", t);
- build-n-run, note that
fileType = (null)
- quit app, go to target info window, build pane, set "Base SDK" to 10.4
- build-n-run, note that
fileType = my doc



I see in the release notes for Leopard that -[NSDocumentController typeFromFileExtension:] is deprecated, but that doesn't mean "stops working", does it?


Am I doing something wrong?
_______________________________________________

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: typeFromFileExtension in Leopard SDK
      • From: Kyle Sluder <email@hidden>
  • Prev by Date: Re: NSDecimalNumber nil parameter to -decimalNumberByAdding: causes Mach exception EXC_BAD_ACCESS
  • Next by Date: Re: Dynamically getting the type of ivars
  • Previous by thread: Re: NSDecimalNumber nil parameter to -decimalNumberByAdding: causes Mach exception EXC_BAD_ACCESS
  • Next by thread: Re: typeFromFileExtension in Leopard SDK
  • Index(es):
    • Date
    • Thread