Plain Text UTI Madness
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