HISE Logo Forum
    • Categories
    • Register
    • Login

    Engine.openWebsite(String url) - return value?

    Scheduled Pinned Locked Moved General Questions
    7 Posts 3 Posters 228 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • LindonL
      Lindon
      last edited by

      So is there any return value from this command that I can check - I'm getting :
      Screenshot 2024-04-03 at 09.23.07.png

      on a users machine...

      HISE Development for hire.
      www.channelrobot.com

      ustkU 1 Reply Last reply Reply Quote 0
      • ustkU
        ustk @Lindon
        last edited by

        @Lindon following the API

        void ScriptingApi::Engine::openWebsite(String url)
        {
            URL u(url);
        
            if (u.isWellFormed())
            {
                auto& tmp = u;
        
                auto f = [tmp]()
                {
                    tmp.launchInDefaultBrowser();
                };
        
                new DelayedFunctionCaller(f, 300);
        
        
            }
            else
            {
                reportScriptError("not a valid URL");
            }
        }
        

        it reports an error only when the URL is wrongly formatted.

        Since here it is the machine that responds with an error, it might be something like there's no default browser. But even in this case, wouldn't the computer ask which application to use? I don't know...

        Might it be a security that prevents the app to open anything on the mac? like a missing hardened runtime or something similar in the jucer/xcode when building the app?

        Can't help pressing F5 in the forum...

        LindonL 1 Reply Last reply Reply Quote 0
        • LindonL
          Lindon @ustk
          last edited by

          @ustk said in Engine.openWebsite(String url) - return value?:

          @Lindon following the API

          void ScriptingApi::Engine::openWebsite(String url)
          {
              URL u(url);
          
              if (u.isWellFormed())
              {
                  auto& tmp = u;
          
                  auto f = [tmp]()
                  {
                      tmp.launchInDefaultBrowser();
                  };
          
                  new DelayedFunctionCaller(f, 300);
          
          
              }
              else
              {
                  reportScriptError("not a valid URL");
              }
          }
          

          it reports an error only when the URL is wrongly formatted.

          well Im not sure thats much help to me then...

          Since here it is the machine that responds with an error, it might be something like there's no default browser. But even in this case, wouldn't the computer ask which application to use? I don't know...

          Might it be a security that prevents the app to open anything on the mac? like a missing hardened runtime or something similar in the jucer/xcode when building the app?

          Pretty sure I codesigned with --hardened run time enabled... so its not that.

          HISE Development for hire.
          www.channelrobot.com

          1 Reply Last reply Reply Quote 0
          • d.healeyD
            d.healey
            last edited by

            Error - Page Not Found - Apple Community

            The page you tried was not found. You may have used an outdated link or may have typed the address (URL) incorrectly.

            favicon

            (discussions.apple.com)

            Libre Wave - Freedom respecting instruments and effects
            My Patreon - HISE tutorials
            YouTube Channel - Public HISE tutorials

            LindonL 1 Reply Last reply Reply Quote 0
            • LindonL
              Lindon @d.healey
              last edited by

              @d-healey said in Engine.openWebsite(String url) - return value?:

              Error - Page Not Found - Apple Community

              The page you tried was not found. You may have used an outdated link or may have typed the address (URL) incorrectly.

              favicon

              (discussions.apple.com)

              😧

              cb7b9519-d231-4bb0-82a0-24c005a90557-image.png

              HISE Development for hire.
              www.channelrobot.com

              d.healeyD 1 Reply Last reply Reply Quote 0
              • d.healeyD
                d.healey @Lindon
                last edited by

                @Lindon Oops! https://discussions.apple.com/thread/254052691?sortBy=best

                Libre Wave - Freedom respecting instruments and effects
                My Patreon - HISE tutorials
                YouTube Channel - Public HISE tutorials

                LindonL 1 Reply Last reply Reply Quote 0
                • LindonL
                  Lindon @d.healey
                  last edited by

                  @d-healey ok thanks - looks like it likely a security config. issue for the user machine....

                  HISE Development for hire.
                  www.channelrobot.com

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post

                  37

                  Online

                  1.8k

                  Users

                  12.1k

                  Topics

                  105.0k

                  Posts