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 protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to