Skip to main content
Version: 9.0.2

sb.receiveEvent

sb.receiveEvent(channel)

Receive an event from a Storyboard IO channel. This is a blocking call so the UI may become unresponsive when used if it takes a while for the event to be received.

Parameters

ParameterTypeDescription
channel stringA Storyboard IO channel to receive the event on.

Returns

TypeDescription
objectAn object containing name, target, format and a data variables from a received event.

Example

// Receive a Storyboard IO event with data payload x, y, z
var ev = sb.receiveEvent("my_channel");
if(ev != null) {
print(ev.name)
print(ev.data)
}

//To disconnect from my_channel
sb.greioDisconnect("my_channel", true);