Great, thanks a lot, guys!
Best posts made by 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!
-
setControlCallback() - "Control Callback function must be an inline function" Error
setControlCallback()
- "Control Callback function must be an inline function" ErrorProblem
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 inlineAvoiding external global variables inside
setControlCallback()
Using
setAttribute()
to store and retrieve blob data within the knob componentCalling
Content.repaint();
after updating values
None of these approaches work. The error persists.
What I'm Trying to Achieve
- I have a custom knob UI that draws a blob shape.
- I want to click a button to regenerate the blob shape (change its randomness).
- 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
- What EXACTLY does HISE require to make an inline function "valid" inside
setControlCallback()
? - What is the best way to store dynamically changing data in a knob component?
- Is there a different approach that avoids this error entirely?
Iβd appreciate any insights. Thanks!
-
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 alaf.registerFunction("drawPanel", fn);
.Is there a way to modify a component without using a
registerFunction
?Thanks in advance.