• 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
Re: Can I set "no extension" as a document file type?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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:50:41 -0400

If you use a * for the extension and OSType (Target properties) it will open any file.

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
References: 
 >Can I set "no extension" as a document file type? (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: Can I set "no extension" as a document file type?
  • Next by Date: Crash in NSTextView with embedded QuickTime file
  • Previous by thread: Re: Can I set "no extension" as a document file type? [solved]
  • Next by thread: Re: Can I set "no extension" as a document file type?
  • Index(es):
    • Date
    • Thread