How data travels through a composition

Most often, data and events travel together. In most compositions, including the example below, the majority of cables are data-and-event (thick) cables. Whenever an event travels through one of these cables, it’s accompanied by a piece of data — like the color that travels from Select Input to Make Rectangle Layer.

The antenna symbols in this composition indicate a hidden cable from the Updated Window output port to the Window input port. To hide a cable, right-click on it and select Hide.

When an event and its companion piece of data reach a node’s input port, the event causes the node to do its job, while the data affects how the node does its job. (This is explained further in How compositions process data.)

Data generally doesn’t travel through a node in the same way that an event does. Instead, the node, informed by its input data, produces other data as output.

Ignoring data

Sometimes you don’t want the data that a node outputs. You just want the events.

One example is the composition below. The Fire Periodically node’s trigger port fires an event along with data — the number of seconds since the composition started — every 3 seconds. The Speak node doesn’t need or want that data. It just needs the event.

To create an event-only cable like the one below, start dragging from the Fired at Time port (pulling out a data-and-event cable), then drop the end of the cable onto the Speak input port. When you connect a data-and-event cable to an event-only port, the cable automatically becomes event-only.

It’s also possible to connect an event-only cable between a pair of data-and-event ports. This can be useful with the Count node, as shown below. Each time the Count node executes, it adds the amount in its Increment port to the total that it outputs. Let’s say you want to count up by 1 every 10 seconds. To control the timing, you can use the events from the Fire Periodically node’s trigger port, but you need to ignore the data from that port. You can accomplish this with an event-only cable.

To create this event-only cable, start dragging from the Fired at Time port. Hold down (Shift) to change the cable from data-and-event to event-only, then drop the end of the cable onto the Increment port.

New in Vuo 2.0

Alternatively, you can drag the cable from the Fired at Time port and drop it into the title area of the Count node. Dropping the end of a cable onto a node’s title area changes the cable to event-only and connects it to the node’s first non-walled port.

Data flow without an event

There are only two cases in which data can travel without an event: from a drawer to its attached node and from a published input port through directly connected cables. Both are explained later, in the section Inputting data.

In all other cases, the only way that data can travel through a composition is when accompanied by an event.