Interface: Skipping changed() callback during onInit
-
I understand this is a warning, but in my case - it probably means something important!
I'm calling .changed() to trigger a button's setControlCallback. (I've also tried directly calling the callback.) The callback It's supposed to do something - but it doesn't seem to do anything.
The only thing I can think of is that the panel containing the button is not visible (and thus, the button is hidden as well.)
Any thoughts? This one's driving me up a tree, lol.
-
I disabled this warning because it's annoying (even though I think it my post that prompted Christoph to add it :) )
The warning basically means you can't call
.changed()
from the on init callback - well you can call it but nothing will happen. You need to call it instead from a control callback, a broadcasters, a timer, or somewhere else that is after on init. -
@d-healey Can you explain how I can deactivate the warning?
-
-
@d-healey Thank you for your response - why can't it be called during init? I'm using it to initialize buttons to specific values (and execute the associated callback from when that happens.). (I'm not calling it from init, but I'm calling functions that do, so maybe that's the same thing,)
-
@clevername27 said in Interface: Skipping changed() callback during onInit:
why can't it be called during init
Dem's da rulez
-
@d-healey Ah, I see. (Wouldn't a message to that effect be better?) So, would that apply to directly calling the callback during init, too?
-
@clevername27 yeah, if you search you'll find my post about it and Christoph's explanation
-
@d-healey Thank you - do you mean this thread?
-
-
@d-healey Thanks for taking the time to dig that up - I hit up Chris about calling the callbacks explicitly. Cheers.
-
@clevername27 Yeah just call the inline function that you're passing to the setCallback() method.
The only thing that changed() would do on top of it is it would set the control as "last touched" if it's set as a plugin parameter. I'm unsure whether that also puts it "in focus" in HISE.
-
@aaronventure Thank you - did not know that!
-