On Feb 21, 2009, at 11:38 AM, Pierce Freeman wrote:
Thanks for your reply.
You're welcome.
I see where you're coming from regarding NSWorkspace, and it seems
like a great idea! How would you recommend scanning it? A loop or
something else more creative?
A loop, sure. The same way you enumerate any array. Fast enumeration
if you're targeting Leopard, or using an index or NSEnumerator.
Is there some reason it is better/easier to use the bundle
identifiers instead of the
name?
A bundle ID is guaranteed to be unique and stable. With a name, there
may be other applications out there that are named the same thing.
Also, the user is free to rename your application, although I don't
know off-hand if the name provided by NSWorkspace is the on-disk name
or the CFBundleName.
And I assume you would get this by sorting through NSWorkspace as
well.
The bundle ID is one of the values in the dictionary elements of the
array returned from -launchedApplications.
Cheers,
Ken
_______________________________________________
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