Re: Opening an http:// URL in the user's default web browser?
Re: Opening an http:// URL in the user's default web browser?
- Subject: Re: Opening an http:// URL in the user's default web browser?
- From: Finlay Dobbie <email@hidden>
- Date: Mon, 27 Aug 2001 19:50:04 +0100
Have you tried LaunchServices directly? There's nothing wrong with
including a whole framework, in fact I think that AppKit might link
against Carbon.framework itself.
LSOpenCFURLRef((CFURLRef)[NSURL
URLWithString:@"
http://www.apple.com"], NULL);
I just tested that and it works. :-)
-- Finlay
On Monday, August 27, 2001, at 07:37 pm, Chris Boot wrote:
I'm trying to open an http:// URL in the user's default web browser.
How
would I go about this in Cocoa? I've tried NSWorkspace's openURL:
method,
but that doesn't work and complains that LaunchServices gave it an error
(application not found). LaunchServices apparently only opens file:///
URLs, judging by the header. So that leaves me with InternetConfig,
which
is part of HIToolbox.framework, in Carbon.framework. I don't want to
have
to include that whole framework, so I'm stumped. Is there any way of
opening such a URL in Cocoa?