• 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: Get my NSDocument-based application out from "Open With" menu?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Get my NSDocument-based application out from "Open With" menu?


  • Subject: Re: Get my NSDocument-based application out from "Open With" menu?
  • From: Conrad Shultz <email@hidden>
  • Date: Thu, 20 Oct 2011 12:37:46 -0700

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10/20/11 12:25 PM, Lee Ann Rucker wrote:
>
> 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._______________________________________________

May I also ask why you would want to do this?  I would generally expect
that if an application lets me open and save a format via the menus that
I would also be able to open it through Finder.


- --
Conrad Shultz

Synthetiq Solutions
www.synthetiqsolutions.com

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk6geIoACgkQaOlrz5+0JdV2/QCfXV2WNQenIKih3GVsnrOW+QO1
ObQAn2ZlJ3xcrc3dVgLFKjyYvUGjohK+
=GGSw
-----END PGP SIGNATURE-----
_______________________________________________

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: Get my NSDocument-based application out from "Open With" menu?
      • From: Lee Ann Rucker <email@hidden>
References: 
 >Get my NSDocument-based application out from "Open With" menu? (From: Nick <email@hidden>)
 >Re: Get my NSDocument-based application out from "Open With" menu? (From: Lee Ann Rucker <email@hidden>)

  • Prev by Date: Re: Get my NSDocument-based application out from "Open With" menu?
  • Next by Date: Scripting Bridge warning: 'no class for scripting class "iTunesBrowserWindow"'
  • Previous by thread: Re: Get my NSDocument-based application out from "Open With" menu?
  • Next by thread: Re: Get my NSDocument-based application out from "Open With" menu?
  • Index(es):
    • Date
    • Thread