Re: Detemine Document Types ...
Re: Detemine Document Types ...
- Subject: Re: Detemine Document Types ...
- From: Graham Cox <email@hidden>
- Date: Thu, 12 Mar 2009 22:26:47 +1100
On 12/03/2009, at 10:09 PM, Mic Pringle wrote:
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.
That should be straightforward also, as all apps have the same layout
- the Info.plist is always at /path/to/app/Contents/Info.plist
Given the path to the file, you can directly initialise a dictionary
using +[NSDictionary dictionaryWithContentsOfFile:<path>] and then
proceed as normal. You don't need a bundle, though you could probably
create one if you wanted to (never tried it) using bundleWithPath:
Off the top of my head I don't know what path this exactly requires,
whether it's the path to the app itself or somewhere (such as /
Contents) within the app's package.
--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