Value Change Broadcaster not firing?
-
Alright, I'm fucking lost. Can anyone make any sense of this?
Why is animatorButtonValue not firing?
const var buttonValueBc = Engine.createBroadcaster({ "id": "animatorButtonValue", "args": ["component", "value"] // this needs to match function arguments });
I'm attaching a component to it from inside a helper function that creates the component. I do the same for the Value Globalize broadcaster you see here, and it works. But animatorButtonValue doesn't fire.
buttonValueBc.attachToComponentValue(component, "-");
However, if I attach it outside the helper function i.e. inside
on init
after calling the function and creating the control, it works as expected. But I already have another value change that I'm attaching inside the helper function and it works! What gives? -
Just ran into this myself. Did you find a solution?
-
Ah it seems to be a different issue in my case. Apparently you can only attach 1 broadcaster to a component's value.
Why would I want two value broadcasters attached to the same component instead of using two listeners and one broadcaster??? I'm glad you asked.
I have two namespaces, declared one after the other that both need to respond to the component's value but the two name spaces are unaware of each other and I want to keep it that way. So I thought I would put a broadcaster in each namespace. My solution for now will be to use a broadcaster in a third namespace that is visible to the other two.
-
@d-healey Yeah same thing.
-
@aaronventure @d-healey Do you have the queue engaged? (Is the Broadcaster not firing, or is the Receive not receiving?)
-
@clevername27 it's unrelated to the queue, you just cannot attach a component to more than one value broadcaster.
I mean you can, but only the first one will fire.
-
@aaronventure HISE's broadcaster system is my favourite thing about HISE (with the exception of the surprise queue). The GUI that @Christoph-Hart innovated is spectacular. But…it also scares me because it puts so much flow control out my hands, that if there's a problem with the system, there's no way I can work around it because everything is so intertwined—that's not a critique of the HISE implementation, it's endemic to any complex system. I ended up creating my own broadcaster system for my plugin—it's generally inferior to HISE's, and I'll slowly migrate it…but only after I'm confident I'll be OK doing so.