• 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: Tell Safari to load URL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tell Safari to load URL


  • Subject: Re: Tell Safari to load URL
  • From: Gregory Weston <email@hidden>
  • Date: Sun, 2 Jan 2005 10:06:21 -0500

Simon alias Trax wrote:

The title says it all...
I want to tell Safari to go to a particular URL.
If Safari is not opened, then my app will tell the Finder to open it, and
then go to the specified URL.

As joar noted, the preferred technique is to send openURL: to the default NSWorkspace. A couple of things worth noting:
a) This isn't going to go to Safari. It's going to go to whatever app is configured to handle URLs of the passed scheme on the user's machine. For HTTP that's Safari by default, but if you _need_ Safari this isn't reliable.
b) Your app doesn't need to make any effort to launch the app.


G

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Tell Safari to load URL
      • From: Nicko van Someren <email@hidden>
    • Re: Tell Safari to load URL
      • From: David Jeffery <email@hidden>
  • Prev by Date: Re: Detect changing font
  • Next by Date: Re: How to use NSLock
  • Previous by thread: Re: Tell Safari to load URL
  • Next by thread: Re: Tell Safari to load URL
  • Index(es):
    • Date
    • Thread