• 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
Launching a web browser
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Launching a web browser


  • Subject: Launching a web browser
  • From: Caveman Caveman <email@hidden>
  • Date: Sat, 24 Nov 2001 03:15:17 -0800 (PST)

I'm fairly new to Cocoa and I have a simple question.
How do I launch an URL in whatever web browser the
user has chosen as their default in System
Preferences? I tried using NSURL's initWithString:
and NSURLHandle's loadInForeground: but I can't get
anything working. I believe my URL is well-formed,
but the call to NSURL initWithString: returns nil.
Can anybody give me an example of what I need to do to
launch <http://www.apple.com> in a browser? Thanks!!
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1


  • Follow-Ups:
    • Re: Launching a web browser
      • From: Angela Brett <email@hidden>
  • Prev by Date: Setting an Outlet to an NSTextView in IB, it seems to get the NSScrollView instead.
  • Next by Date: Re: Launching a web browser
  • Previous by thread: Re: Setting an Outlet to an NSTextView in IB, it seems to get the NSScrollView instead.
  • Next by thread: Re: Launching a web browser
  • Index(es):
    • Date
    • Thread