Module gears.object

Info:

  • Author: Uli Schlachter
  • Copyright: 2010 Uli Schlachter
  • Release: v3.5.1

Functions

find_signal (obj, name, error_msg) Find a given signal
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

find_signal (obj, name, error_msg)
Find a given signal

Parameters:

  • obj The object to search in
  • name The signal to find
  • error_msg Error message for if the signal is not found

Returns:

    The signal table
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 function receives the object as first argument and then any extra arguments that are given to emit_signal()

Parameters:

  • name The name of the signal
  • ... Extra arguments for the callback functions. Each connected
generated by LDoc 1.3.11