• 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: Detemine Document Types ...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Detemine Document Types ...


  • Subject: Re: Detemine Document Types ...
  • From: Mic Pringle <email@hidden>
  • Date: Thu, 12 Mar 2009 11:09:56 +0000

Hi Graham,

It's not that I wanted to avoid it, I wasn't aware it was that easy :-)

However, in your example you use the mainbundle of the current
application. Is it possible to use this technique when the bundle is
another application ?

i.e. the task I'm trying to achieve is when given an application (any
application on the host system) I'd like to determine what document
types it's associated with.

Thanks

-Mic

2009/3/12 Graham Cox <email@hidden>:
>
> On 12/03/2009, at 9:48 PM, Mic Pringle wrote:
>
>> Hi,
>>
>> Is there a way (programmatically) that I can determine which document
>> types a particular application can open/view etc without resorting to
>> parsing it's info.plist file ?
>
>
> Doesn't look like there is - NSDocumentController (where you might expect a
> method for this) doesn't have anything - it apparently reads the info.plist
> as necessary.
>
> But when you say "parse", you're aware that you can do:
>
> NSDictionary* info = [[NSBundle mainBundle] infoDictionary];
>
> and then simply request the types:
>
> NSArray* docTypes = [info objectForKey:@"CFBundleDocumentTypes"];
>
> Why would you want to avoid this when it's so straightforward?
>
> --Graham
>
>
>
_______________________________________________

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: Detemine Document Types ...
      • From: Kyle Sluder <email@hidden>
    • Re: Detemine Document Types ...
      • From: Graham Cox <email@hidden>
References: 
 >Detemine Document Types ... (From: Mic Pringle <email@hidden>)
 >Re: Detemine Document Types ... (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Detemine Document Types ...
  • Next by Date: Re: Detemine Document Types ...
  • Previous by thread: Re: Detemine Document Types ...
  • Next by thread: Re: Detemine Document Types ...
  • Index(es):
    • Date
    • Thread