|
|
|
@ -172,8 +172,10 @@ the node will come online later. `query` must be a valid query, chosen from
|
|
|
|
`BaseControl.Query`. A full list of currently supported queries was shown above.
|
|
|
|
`BaseControl.Query`. A full list of currently supported queries was shown above.
|
|
|
|
The `callback` function will get one argument: The new value of the noun that
|
|
|
|
The `callback` function will get one argument: The new value of the noun that
|
|
|
|
triggered the event. `listen` returns a unique id for the installed listener
|
|
|
|
triggered the event. `listen` returns a unique id for the installed listener
|
|
|
|
that could later be used to cancel it.
|
|
|
|
that could later be used to cancel it. `listen` also returns a boolean as the
|
|
|
|
|
|
|
|
second value: It indicates whether an attempt was made at installing the
|
|
|
|
|
|
|
|
listener. If the noun was not yet known (`false`), the listener is still kept
|
|
|
|
|
|
|
|
and will be installed as soon as the noun is registered.
|
|
|
|
```lua
|
|
|
|
```lua
|
|
|
|
bc = require("bc"):finalize{"some_noun"}
|
|
|
|
bc = require("bc"):finalize{"some_noun"}
|
|
|
|
bc:listen("some_noun", bc.Query.Change, function(value)
|
|
|
|
bc:listen("some_noun", bc.Query.Change, function(value)
|
|
|
|
|