HISE Logo Forum
    • Categories
    • Register
    • Login

    Function parameters for callback functions

    Scheduled Pinned Locked Moved Solved Scripting
    3 Posts 2 Posters 133 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) {...}
      
      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

        Free HISE Bootcamp Full Course for beginners.
        YouTube Channel - Public HISE tutorials
        My Patreon - 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

          22

          Online

          2.0k

          Users

          12.7k

          Topics

          110.1k

          Posts