Re: [NSWorkspace openURL:] - any way to avoid a new tab?
Re: [NSWorkspace openURL:] - any way to avoid a new tab?
- Subject: Re: [NSWorkspace openURL:] - any way to avoid a new tab?
- From: Jens Alfke <email@hidden>
- Date: Thu, 07 Apr 2016 08:14:12 -0700
-openURL is pretty generic, working with any type of URL that there's an app registered for, so it doesn't have a notion of specific UIs like tabs.
If you send an AppleEvent directly to Safari, there might be a param to control tab behavior. But that would annoy users who have a different default browser...
—Jens
> On Apr 6, 2016, at 7:24 PM, Graham Cox <email@hidden> wrote:
>
> Hi all,
>
> My app uses [NSWorkspace openURL:] to display help pages in the user’s default browser. Each new request creates a new tab (at least in Safari). Is there a way to pass a hint that no new tab is created if there is an existing tab for the same domain? I looked at NSWorkspace’s launch options but none of those appear to apply.
>
> If there’s no way we might need to consider a webview within the app instead, but hoping that we can do it more easily.
>
> —Graham
>
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden