typeFromFileExtension in Leopard SDK
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