HISE Logo Forum
    • Categories
    • Register
    • Login
    1. HISE
    2. daniloprates
    D
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 4
    • Groups 0

    daniloprates

    @daniloprates

    1
    Reputation
    3
    Profile views
    4
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    daniloprates Unfollow Follow

    Best posts made by daniloprates

    • RE: LAF how to customize any object?

      Great, thanks a lot, guys!

      posted in Scripting
      D
      daniloprates

    Latest posts made by daniloprates

    • RE: setControlCallback() - "Control Callback function must be an inline function" Error

      Yes, this was done by ChatGPT πŸ˜… I tried to reply the post with this warning, but I didn't have the rights, as a new user.

      Thanks David!

      posted in Scripting
      D
      daniloprates
    • setControlCallback() - "Control Callback function must be an inline function" Error

      setControlCallback() - "Control Callback function must be an inline function" Error

      πŸ›  Problem

      I'm developing a custom knob UI in HISE that draws a blob shape.
      I want to click a button to regenerate the blob (change its randomness),
      but I keep getting this error:

      Control Callback function must be an inline function
      

      I've tried:

      • βœ… Making sure the function inside setControlCallback() is completely inline
      • βœ… Avoiding external global variables inside setControlCallback()
      • βœ… Using setAttribute() to store and retrieve blob data within the knob component
      • βœ… Calling Content.repaint(); after updating values

      None of these approaches work. The error persists.


      πŸ”§ What I'm Trying to Achieve

      1. I have a custom knob UI that draws a blob shape.
      2. I want to click a button to regenerate the blob shape (change its randomness).
      3. The knob should NOT update the blob shapeβ€”only the button should trigger the change.

      ❌ What’s Failing

      Even when using a fully inline function like this:

      btn.setControlCallback(function(component, value) {
          if (value) {
              Console.print("Blob Clicked! Generating new shape.");
              
              // Try storing data inside the knob to update later
              var knobComponent = Content.getComponent("knob1");
              knobComponent.setAttribute("blobData", generateBlob(9, 0.35, 0.1));
      
              Content.repaint(); // UI refresh
          }
      });
      

      I still get the error.


      ❓ Questions for the Community

      1. What EXACTLY does HISE require to make an inline function "valid" inside setControlCallback()?
      2. What is the best way to store dynamically changing data in a knob component?
      3. Is there a different approach that avoids this error entirely?

      I’d appreciate any insights. Thanks! πŸ™

      posted in Scripting
      D
      daniloprates
    • RE: LAF how to customize any object?

      Great, thanks a lot, guys!

      posted in Scripting
      D
      daniloprates
    • LAF how to customize any object?

      Hey there,

      First of all, I'm new here and am loving the community and collective effort.

      I'm trying to understand LAF, but couldn't find an easy way to find which registerFunction fn to use for each UI component. For instance, I'm trying to modify the laf of a panel, but couldn't find a laf.registerFunction("drawPanel", fn);.

      Is there a way to modify a component without using a registerFunction?

      Thanks in advance.

      posted in Scripting
      D
      daniloprates