Bus.addWatch

Adds a bus watch to the default main context with the default priority. This function is used to receive asynchronous messages in the main loop. The watch can be removed using Source.remove or by returning FALSE from func. MT safe.

class Bus
uint
addWatch
(
bool delegate dlg
)

Parameters

dlg bool delegate

A function to call when a message is received.

Return Value

Type: uint

The event source id.