Re: Can I set "no extension" as a document file type?
Re: Can I set "no extension" as a document file type?
- Subject: Re: Can I set "no extension" as a document file type?
- From: Matt Mashyna <email@hidden>
- Date: Wed, 27 Sep 2006 16:52:08 -0400
oops. read it too fast the first time. Sorry.
On Sep 27, 2006, at 4:39 PM, Jerry Krinock wrote:
In a document-based app, I would like to open files which have no
extension,
for example, "/path/to/MyFile".
(It was not my idea to have a document file with no extension; I am
opening
a document produced by someone else's app.)
Attempt 1: In Xcode's Target > Properties, I added a Document type,
"Document" and left the extension column blank. Results:
Info.plist had no
key for CFBundleTypeExtensions, and when my app runs the Open
dialog, files
with no extensions are NOT enabled. No good.
Attempt 2: in Info.plist I added this key/value pair:
<key>CFBundleTypeExtensions</key>
<array>
<string></string>
</array>
Results: In Target > Properties, the extension column now reads
"" (two
double quotes), signifying an empty string. When my app runs the Open
dialog, ALL files are enabled, no matter what their extension.
Attempt 3: I over-rode -[NSDocumentController
runModalOpenPanel:forTypes:],
but I see that the array passed in the forTypes: argument includes
the empty
string "", as expected.
Anyone know a way to enable ONLY files with NO extension?
The file type I'm trying to enable does not have an HFS Creator or
Type code
either.
Jerry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden