Module gears.object
Info:
- Copyright: 2010 Uli Schlachter
- Release: v3.5.1
- Author: Uli Schlachter
Functions
object:add_signal (name) | Add a signal to an object. |
object:connect_signal (name, func) | Connect to a signal |
object:disconnect_signal (name, func) | Disonnect to a signal |
object:emit_signal (name, ...) | Emit a signal |
Functions
- object:add_signal (name)
-
Add a signal to an object. All signals must be added before they can be used.
Parameters:
- name The name of the new signal.
- object:connect_signal (name, func)
-
Connect to a signal
Parameters:
- name The name of the signal
- func The callback to call when the signal is emitted
- object:disconnect_signal (name, func)
-
Disonnect to a signal
Parameters:
- name The name of the signal
- func The callback that should be disconnected
- object:emit_signal (name, ...)
-
Emit a signal
Parameters:
- name The name of the signal
- ... Extra arguments for the callback functions. Each connected function receives the object as first argument and then any extra arguments that are given to emit_signal()