HISE Logo Forum
    • Categories
    • Register
    • Login

    ain't working on my end

    Scheduled Pinned Locked Moved General Questions
    8 Posts 3 Posters 699 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.
    • JayJ
      Jay
      last edited by

      Re: button for sharing this isn't working, it ain't doing nothing

      Joansi Villalona

      d.healeyD hisefiloH 2 Replies Last reply Reply Quote 0
      • d.healeyD
        d.healey @Jay
        last edited by

        @jay share code snippet please

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

        JayJ 1 Reply Last reply Reply Quote 0
        • hisefiloH
          hisefilo @Jay
          last edited by Dominik Mayer

          @jay I placed a transparent panel over a fake button, and it's working for me.

          1. add a panel (right click, add Panel), name it Panel1
          2. Paste below code
          const var Panel1 = Content.getComponent("Panel1");
          
          Panel1.setPaintRoutine(function(g)
          {
              g.setColour(Colours.cornflowerblue);
              g.drawText("donate", [0,0,0,0]);
          });
          
          Panel1.setMouseCallback(function(event)
          {
          	if (event.clicked)
          	  Engine.openWebsite("http://website.com/");
          });
          
          JayJ 2 Replies Last reply Reply Quote 2
          • JayJ
            Jay @hisefilo
            last edited by

            @hisefilo thanks I'll try this as soon as I get home, and let you know

            Joansi Villalona

            1 Reply Last reply Reply Quote 0
            • JayJ
              Jay @hisefilo
              last edited by Dominik Mayer

              @hisefilo said in ain't working on my end:

               const var Panel1 = Content.getComponent("Panel1");
               Panel1.setPaintRoutine(function(g)
               {
                 g.setColour(Colours.cornflowerblue);
                 g.drawText("donate", [0,0,0,0]);
               });
              
               Panel1.setMouseCallback(function(event)
               {
               	if (event.clicked)
               	  Engine.openWebsite("http://website.com/");
               });
              

              it is not working for me

              Joansi Villalona

              1 Reply Last reply Reply Quote 0
              • JayJ
                Jay @d.healey
                last edited by Dominik Mayer

                @d-healey

                HiseSnippet 1168.3ocsVssaaTDFd1DuowKDnUpW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DMwzzLmFH2HVplafiy9rKgIP1VnUc2motPKGACSlUxhbtmNi6VEMXMAaDmZZtNK3itB4357yvwM0rfBKxJlAitAMeVmMi2P4g4TVrp0bDyU0ZtCyvvl2DF1z01yyBf+p..+Ir.RgRJlVVcie4nO7snEntig7e76eTFYSoYovc+UuLpCBKo8nG8aYzPu6rGXBnjNNlnWbrnY9eNCHUYg4OlYLBHIe57uOXElU1ZoyJWZlvcDtOvsGGZAsb7t1RvKjQ8+Mdye4wVtcGNjEnKAaE2C99+qOyXEfhcBQ3wDcJ2jecx3j9P1P.CPh.x5TlTs0LUa18sL6Mdl9LAMayagublsM6cxY1tfIJgDjJOOv1Dw71lMyn.XRj8rtpv6Kg831nrFKVbm.O357f.ii3S.jubM1Yk03SWYMd7JqwtqrFOYk03yVYM97aQCyqae9XsLwVV.D50MqkpiSWAAxpxx.Q+C2TbcLA
                

                Joansi Villalona

                d.healeyD hisefiloH 2 Replies Last reply Reply Quote 0
                • d.healeyD
                  d.healey @Jay
                  last edited by

                  @jay said in ain't working on my end:
                  A quick way to debug this kind of thing is with a Console.print command. For example I put this in your code

                      if (event.doubleClick)
                      {
                          Console.print("hello");
                        //Engine.openWebsite("http://www.rbemis.com/orange/index.html");
                      }
                  

                  And double clicking your label produces nothing in the console so straight away I can see that the double click action isn't firing. Find out why that is and you will have your solution.

                  However putting this Engine.openWebsite("http://www.rbemis.com/orange/index.html"); right at the start of your script causes a web browser to be opened when I press compile. This tells me that the Engine.openWebsite() function is not that cause of the issue.

                  So I have done further tests and I am having the same result as you. The mouse callback is not being triggered when click or double clicking the panel.

                  My next step was to look at the code Christoph posted and compare it to yours. And yours is pretty much exactly the same so something strange it happening. And the result is after a lot of tests I worked out that something weird is happening when copying from Christoph's code into HISE. If you delete this line LinkPanel.set("allowCallbacks", "Clicks Only"); and type it back in manually, exactly the same, it will work. Very strange.

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

                  1 Reply Last reply Reply Quote 1
                  • hisefiloH
                    hisefilo @Jay
                    last edited by

                    @jay forgot to mention sorry, on allowCallbacks enable All Callbacks for the Panel1 0_1537348408510_Screen Shot 2018-09-19 at 6.12.05 AM.png

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

                    45

                    Online

                    1.7k

                    Users

                    11.7k

                    Topics

                    101.9k

                    Posts