Events from Published Port?

An event firing question, I know these things have been covered from various directions, searching forum and manual, no answer yet. I’ve been running into this issue lately where I wish I could get a published port (or combinations of) to fire an event when the port value(s) change(s). The pic shows what I thought were obvious choices, but I get nothing from the port when Show Events is on, so anything it’s connected to is for naught. Kind of related to the Fire When Value Changes example node, I suppose? This is not a protocol comp, not sure if the different rules for protocol comps could help?

Screen Shot 2021-10-26 at 7.40.49 PM.png

Ah, I just found this in the manual, under Editing Data in a Published Port: Inputting data

If you’re running the composition as a standalone composition (not a subcomposition), after you edit a published input port’s data, the new data will immediately flow through any cables directly connected to the published input port — but no farther. This is a rare case in which data flows without an event.

Any workaround?

EDIT: okay, at least this works…

Screen Shot 2021-10-26 at 7.59.26 PM.png  

1 Like

This is not a protocol comp, not sure if the different rules for protocol comps could help?

When you run a protocol composition, the application running the composition (whether that’s Vuo or something else) fires a stream of events into the composition. Whenever you edit the data of a published input port, the published input port transmits an event that pushes the data downstream through the composition. More info: How events travel through a protocol composition.

When you run a non-protocol composition, there’s no stream of events coming from outside. You have to add the trigger yourself (as above when you added Fire on Display Refresh).

When you use a subcomposition (whether or not it conforms to a protocol), the only events that come in from outside the subcomposition are those that travel through cables into the subcomposition’s input ports in the parent composition. More info: How events travel through a subcomposition.

In the cases where you don’t have a stream of events coming from outside to push your changes through the composition, you can use Fire on Display Refresh and Allow Changes — similar to your approach, just fewer nodes.

fire and allow changes.png

1 Like

Thank you, Jaymie!