|
08-11-2017, 04:17 AM
|
#1
|
Human being with feelings
Join Date: Aug 2013
Posts: 236
|
OpenURL() problem on OSX
I find a problem with OpenURL() on OSX 10.9
Do nothing when I call OpenURL()
Is there any known issue?
Or maybe problems with operating system and the default browser?
|
|
|
08-11-2017, 07:33 AM
|
#2
|
Human being with feelings
Join Date: Sep 2009
Location: Virginia
Posts: 2,067
|
This might work.
ShellExecuteA(NULL, ("open"), "http://forum.cockos.com/forumdisplay.php?f=20", NULL, NULL, SW_SHOWNORMAL);
|
|
|
08-12-2017, 12:35 AM
|
#4
|
Human being with feelings
Join Date: Aug 2013
Posts: 236
|
Please guys read my message!
The problem is on Mac OSX not on windows. ShellExecute it's an windows command
OSX 10.5 - OpenURL() working
OSX 10.9 - OpenURL() not working
|
|
|
08-12-2017, 04:03 AM
|
#5
|
Human being with feelings
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
|
WDL's SWELL provides an implementation of ShellExecute for macOS and Linux.
|
|
|
08-12-2017, 08:12 AM
|
#6
|
Human being with feelings
Join Date: Aug 2013
Posts: 236
|
On WDL (Tale and Ol) the function for Mac is
Code:
bool IGraphicsMac::OpenURL(const char* url, const char* msgWindowTitle, const char* confirmMsg, const char* errMsgOnFailure)
{
#pragma REMINDER("Warning and error messages for OpenURL not implemented")
NSURL* pURL = 0;
if (strstr(url, "http"))
{
pURL = [NSURL URLWithString:ToNSString(url)];
}
else
{
pURL = [NSURL fileURLWithPath:ToNSString(url)];
}
if (pURL)
{
bool ok = ([[NSWorkspace sharedWorkspace] openURL:pURL]);
// [pURL release];
return ok;
}
return true;
}
|
|
|
08-12-2017, 03:52 PM
|
#7
|
Human being with feelings
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
|
seems to work for me, is there an error in the xcode console?
|
|
|
08-13-2017, 01:54 AM
|
#8
|
Human being with feelings
Join Date: Aug 2013
Posts: 236
|
Quote:
Originally Posted by olilarkin
seems to work for me, is there an error in the xcode console?
|
Nope is not any error in the xcode console.
|
|
|
08-13-2017, 04:26 AM
|
#9
|
Human being with feelings
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
|
what's the url?
|
|
|
08-13-2017, 04:32 AM
|
#10
|
Human being with feelings
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
|
okay looks like it won't open https: links. I'm midway through a lot of changes at the moment,but in the meantime you can fix it with this modification to IGraphicsMac.mm
diff --git a/WDL/IPlug/IGraphicsMac.mm b/WDL/IPlug/IGraphicsMac.mm
index 8c80a65c2f..8447c347d0 100644
--- a/WDL/IPlug/IGraphicsMac.mm
+++ b/WDL/IPlug/IGraphicsMac.mm
@@ -701,7 +701,7 @@ - (BOOL)canBecomeKeyWindow {return YES;}
{
#pragma REMINDER("Warning and error messages for OpenURL not implemented")
NSURL* pURL = 0;
- if (strstr(url, "http"))
+ if (url && (!strnicmp(url,"http://", 7) || !strnicmp(url,"https://", 8)))
{
pURL = [NSURL URLWithString:ToNSString(url)];
}
oli-mbp:IPlug oli$
|
|
|
08-13-2017, 11:31 AM
|
#11
|
Human being with feelings
Join Date: Aug 2013
Posts: 236
|
Oli cannot see the difference
Condition from
if (strstr(url, "http"))
{
pURL = [NSURL URLWithString:ToNSString(url)];
}
Is also met for https, for example url[]="https://www.google.com" match the condition.
What did you just add caps look "HTTPS://WWW.GOOGLE.COM"
|
|
|
08-13-2017, 12:59 PM
|
#12
|
Human being with feelings
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
|
Okay please tell me the Url is not working.
|
|
|
08-14-2017, 01:57 AM
|
#13
|
Human being with feelings
Join Date: Aug 2013
Posts: 236
|
Quote:
Originally Posted by olilarkin
Okay please tell me the Url is not working.
|
https://vst.saschart.com
OSX 10.9 - not working
|
|
|
08-14-2017, 02:02 AM
|
#14
|
Human being with feelings
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
|
In VST and audio unit? Which host? Which STK are you building against?
|
|
|
08-14-2017, 06:50 AM
|
#15
|
Human being with feelings
Join Date: Aug 2013
Posts: 236
|
Quote:
Originally Posted by olilarkin
In VST and audio unit? Which host? Which STK are you building against?
|
Both VST and AU, tested on Reaper and Logic Pro
|
|
|
08-14-2017, 07:00 AM
|
#16
|
Human being with feelings
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
|
which sdk?
|
|
|
08-14-2017, 07:06 AM
|
#17
|
Human being with feelings
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
|
it must be something wrong on your system with the default browser. your url works fine on my machine, with different sdks. I'm on 10.12
|
|
|
08-14-2017, 07:43 AM
|
#18
|
Human being with feelings
Join Date: Aug 2013
Posts: 236
|
Quote:
Originally Posted by olilarkin
it must be something wrong on your system with the default browser. your url works fine on my machine, with different sdks. I'm on 10.12
|
Thanks olilarkin for your great help !!!
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 11:15 PM.
|