thing.update(xxx)
is called, the watcher will output "New value is xxx"
.cp.watcher.new(...) -> watcher
...
- The list of event name strings supported by the watcher.cp.watcher:events()
cp.watcher:getCount()
cp.watcher:notify(type, ...) -> nil
type
- The event type to notify. Must be one of the supported events....
- These parameters are passed directly to the event watcher functions.cp.watcher:unwatch(id) -> boolean
id
- The unique ID returned from watch
.true
if a watcher with the specified ID exists and was successfully removed.cp.watcher:watch(events) -> id
events
- A table of functions, one for each event to watch.unwatch
to stop watching.