Skip navigation.
 
mlRe: Do constants exist for the standard application names when using NSWorkspace launchApplication?
FROM : glenn andreas
DATE : Fri Apr 29 15:55:29 2005

On Apr 29, 2005, at 5:28 AM, Adam Holt wrote:

> I'm using:
>
>    [[NSWorkspace sharedWorkspace] launchApplication:@"Address Book"];
>
> to launch the Address Book application from an NSButton in my
> application.
>
> I presume however that "Address Book" carries a different name on
> non-English systems?  Would I be correct in assuming that my
> NSWorkspace
> call therefore wouldn't work in that case?
>
> If so, is there a best-practise method to refer to the standard
> applications, e.g. some constants that point to the right application
> name
> depending on the localised language settings?
>


I'd suggest using the launchAppWithBundleIdentifier... version (which
also takes a bunch of extra parameters), since you can pass in
@"com.apple.AddressBook" (and the bundle identifier will be persistent
even if the user decides for some reason to rename the application).


Glenn Andreas                      <email_removed> 
  <http://www.gandreas.com/> oh my!
quadrium | build, mutate, evolve | images, textures, backgrounds, art