Vizard 7 » Command Index » Vizard modules » vizact » <vizact>.onsensorup
7.5

<vizact>.onsensorup

Registers a function to handle sensor up events

<vizact>.onsensorup(  
sensor  
button  
func  
*args  
)  
sensor
The sensor object to handle
button
The button on the sensor to handle
func
The function to call when the sensor button is released
*args
The arguments to pass to the function

Remarks

This command will call the given function when the specified sensor button is released.

Return Value

A vizact.EventFunction object with the following methods:

Method

Description

<event>.setEnabled(val)

Enable/Disable the event function. The associated function will not be called while the event function is disabled. viz.TOGGLE can be used to toggle the state. Event functions are initially enabled.

<event>.getEnabled()

Get the enabled state of the event function.

<event>.remove()

Permanently unregister the event function.