• 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
Plain Text UTI Madness
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Plain Text UTI Madness


  • Subject: Plain Text UTI Madness
  • From: Seth Willits <email@hidden>
  • Date: Wed, 28 Jan 2009 17:56:27 -0800


I'm trying to get this NSOpenPanel to select all plain text files. This should be *simple* right? Sheesh. So I thought I'd use a UTI (in addition to some specific extensions and the HFS type 'TEXT'), so I added kUTTypePlainText. That really should be just dandy for my needs.


Except it's not.

I have a file without an extension, which in Finder is shown as "Plain text", has kMDItemKind = "Plain text", and yet kMDItemContentType is "public.data" -- what gives? Why is it a plain text "kind" of file, but not public.plain-text?

Short of allowing *any* file to be selected by this open panel, the only thing I can think to do is create a delegate which checks kMDItemContentType for the file to see if it's "Plain text". I really would rather not.

Can anyone offer some helpful tips?


Thanks,


-- Seth Willits


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Plain Text UTI Madness
      • From: "Sean McBride" <email@hidden>
  • Prev by Date: Sub-pixel font smoothing with CGBitmapContext
  • Next by Date: Re: Detecting Initialization
  • Previous by thread: Re: Sub-pixel font smoothing with CGBitmapContext
  • Next by thread: Re: Plain Text UTI Madness
  • Index(es):
    • Date
    • Thread