HISE Logo Forum
    • Categories
    • Register
    • Login

    Function parameters for callback functions

    Scheduled Pinned Locked Moved Solved Scripting
    3 Posts 2 Posters 109 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.
    • oskarshO
      oskarsh
      last edited by

      Is it possible to add function parameters to callbacks?

      Example code on what I am trying to achieve:

      Server.downloadFile(url, {}, target, callbackFunc(parameter));
      inline function callbackFunc(parameter) {...}
      

      breathing HISE

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

        @oskarsh No, the parameters of callbacks are always predefined. You need to store your values in namespace wide reg variables or pass them in via lambda.

        Christoph gives an example of that here

        Link Preview Image
        downloadFile & repaint issue

        @iamlamprey No this is a reserved keyword which you can't pass as lambda. But if you copy it as a normal variable, it should work. Try: // I don't know if yo...

        favicon

        Forum (forum.hise.audio)

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

        1 Reply Last reply Reply Quote 1
        • oskarshO
          oskarsh
          last edited by

          @d-healey thanks will do!

          breathing HISE

          1 Reply Last reply Reply Quote 0
          • oskarshO oskarsh marked this topic as a question on
          • oskarshO oskarsh has marked this topic as solved on
          • First post
            Last post

          43

          Online

          1.7k

          Users

          11.7k

          Topics

          101.8k

          Posts