• 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: exec(uting) Safari - How (newbie)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: exec(uting) Safari - How (newbie)


  • Subject: Re: exec(uting) Safari - How (newbie)
  • From: Kevin Elliott <email@hidden>
  • Date: Tue, 1 Jul 2008 17:17:07 -0700

On Jul 1, 2008, at 8:53 AM, Kyle Sluder wrote:

On Tue, Jul 1, 2008 at 11:30 AM, Jason Coco <email@hidden> wrote:
You could also use /usr/bin/open -- then you wouldn't have to know where
safari lives.

Abaddesignsayswhat? What do you think open uses anyway? ;-)

With out looking at the source, I'd guess a whole heaping mess of LaunchServices code. If the choice is between exec directly or exec open, open is hands down the better choice.


Of course, they're both bad choices. As several people have pointed out, NSWorkspace launchApplication or openURL depending on the requirements. If it's not possible to use NSWorkspace (i.e. because you can't link against AppKit) consider NSTask or using LaunchServices. But unless you have a SPECIFIC, low level requirement exec is the wrong API.

-Kevin Elliott
DTS Engineer
email@hidden
_______________________________________________

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: exec(uting) Safari - How (newbie)
      • From: "Kyle Sluder" <email@hidden>
References: 
 >exec(uting) Safari - How (newbie) (From: "Barrie Green" <email@hidden>)
 >Re: exec(uting) Safari - How (newbie) (From: Kristopher Matthews <email@hidden>)
 >Re: exec(uting) Safari - How (newbie) (From: Jason Coco <email@hidden>)
 >Re: exec(uting) Safari - How (newbie) (From: "Kyle Sluder" <email@hidden>)

  • Prev by Date: Re: KVC/KVO compliance of a container adding multiple objects
  • Next by Date: Re: NSDateComponents question
  • Previous by thread: Re: exec(uting) Safari - How (newbie)
  • Next by thread: Re: exec(uting) Safari - How (newbie)
  • Index(es):
    • Date
    • Thread