Forum
    • Categories
    • Register
    • Login

    Solved Function parameters for callback functions

    Scripting
    2
    3
    22
    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) {...}
      
      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

        https://forum.hise.audio/topic/6948/downloadfile-repaint-issue/8

        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!

          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

          12

          Online

          1.2k

          Users

          7.9k

          Topics

          71.4k

          Posts