Re: Using file types in Document Based Applications...
Re: Using file types in Document Based Applications...
- Subject: Re: Using file types in Document Based Applications...
- From: Ali Ozer <email@hidden>
- Date: Mon, 25 Jun 2001 23:25:12 -0700
I am trying to figure out how to make the open dialog in my document
based
app let you open files based on there file type (not the extension). I
think I have to change the target settings, but I am not sure how. Can
anyone help?
This is supposed to be fairly easy; just specify the types in the
Info.plist (by editing the Application Settings in PB). However, due to
a bug in NSDocumentController this doesn't work as expected in 10.0.
Matt Formica recently posted a message about this; I'm forwarding it
below.
Note that the problem is just with NSDocument; if you are using
NSOpenPanel directly, you can supply a list of types via the functions
defined in <Foundation/NSHFSFileTypes.h> and this should let you open
extension based or Mac OS type based documents.
Ali
Begin forwarded message:
From: Matthew Formica <email@hidden>
Date: Wed Jun 20, 2001 11:42:56 US/Pacific
To: Cocoa Developer <email@hidden>
Subject: NSDocumentController patch
All,
The release notes for AppKit state that NSDocumentController now (as of
Mac
OS X 10.0) supports HFS file types. In fact, this is incorrect - in
general, this support is still broken out of the box. However, I've
just
posted a Q&A that provides some copy-and-paste code for your apps that
will
fix the bug. The link is:
http://developer.apple.com/qa/qa2001/qa1039.html
This bug should be fixed for the next major version (i.e. not 10.0.x)
of Mac
OS X.
Regards,
Matthew Formica
Apple DTS Engineer - Dev Tools and Cocoa
email@hidden
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev