• 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
Opening local HTML file in new Safari tab?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Opening local HTML file in new Safari tab?


  • Subject: Opening local HTML file in new Safari tab?
  • From: Jeff Hunter <email@hidden>
  • Date: Fri, 17 Oct 2003 21:16:50 -0400

I have Safari set to open links from external applications in the current window, and tabbed browsing is enabled.

If I have a Safari window open, then I call

[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"http://www.apple.com";]]

the site will be loaded in a new tab in the currently open Safari window.

However, if I call

[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"file:///Users/Foo/MyFile.html"]]

the HTML file will be opened in a new Safari window.

Does anyone know how I can get Safari to load the local HTML file in a new tab instead of opening a new window? Perhaps by dropping down to the LaunchServices level there is a flag I can use to fool Safari?

Thanks,

Jeff Hunter
_______________________________________________
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: Re: Passing Objects In Messages
  • Next by Date: Re: Passing Objects In Messages
  • Previous by thread: Re: Passing Objects In Messages
  • Next by thread: Re: X-CodeControlers
  • Index(es):
    • Date
    • Thread