On Oct 20, 2011, at 4:51 AM, Nick wrote:

> Hello
> I have an application that is able to process .txt files, which can be
> opened using File->Open and saved with File->Save, File->Save As.
> The problem is that Finder thinks that my application is an app that the
> user may want to open by double clicking a text file. How does it do it? And
> how could I prevent OS X from adding my application to the list "Open With"
> of the context menu of txt files?
> Thank you

Take .txt out of your plist, subclass [NSDocumentController 
runModalOpenPanel:forTypes:] to add "txt" to the types it can open, and (I 
think; I haven't done this) [NSDocument 
fileNameExtensionForType:saveOperation:] for save - if not, that's a starting 
point._______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to