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

Can I set "no extension" as a document file type?


  • Subject: Can I set "no extension" as a document file type?
  • From: Jerry Krinock <email@hidden>
  • Date: Wed, 27 Sep 2006 13:39:28 -0700
  • Thread-topic: Can I set "no extension" as a document file type?

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

  • Follow-Ups:
    • Re: Can I set "no extension" as a document file type?
      • From: Matt Mashyna <email@hidden>
    • Re: Can I set "no extension" as a document file type?
      • From: Matt Mashyna <email@hidden>
    • Re: Can I set "no extension" as a document file type?
      • From: "Stephen Deken" <email@hidden>
  • Prev by Date: Re: converting NSImage
  • Next by Date: Re: converting NSImage
  • Previous by thread: Getting color table info from an NSImage
  • Next by thread: Re: Can I set "no extension" as a document file type?
  • Index(es):
    • Date
    • Thread