• 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: Open an URL contained in an NSString
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Open an URL contained in an NSString


  • Subject: Re: Open an URL contained in an NSString
  • From: John Anderson <email@hidden>
  • Date: Fri, 30 Aug 2002 12:06:59 -0700

You need to turn it into an NSURL and then hand it off to NSWorkspace.

In other words:

NSURL *myURLRef = [NSURL URLWithString:myURL];
[[NSWorkspace sharedWorkspace] openURL: myURLRef];

John Anderson


On Friday, August 30, 2002, at 10:32 AM, Arthur VIGAN wrote:

Hi,

I would like to open an URL contained in an NSString directly from an
application. My strings is made like that:

NSString *myURL = [NSString stringWithFormat:@"%@%@", @"http://anURL";,
@"aUserInformationAddedToURL"]

How can I launch the web browser and open it?

Thanks in advance,

Arthur
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: [Q] CopyWithZone:error
  • Next by Date: Re: Using AddressBook
  • Previous by thread: Re: Open an URL contained in an NSString
  • Next by thread: Break on -[NSException raise] as a permanent setting?
  • Index(es):
    • Date
    • Thread