Signals.connectObjectWhileAlive

Warning gtk_signal_connect_object_while_alive is deprecated and should not be used in newly-written code. Use g_signal_connect_object() instead, passing G_CONNECT_SWAPPED as connect_flags. These signal connectors are for signals which refer to objects, so they must not be called after the object is deleted. Unlike gtk_signal_connect_while_alive(), this swaps the object and user data, making it suitable for use with functions which primarily operate on the user data. This function acts just like gtk_signal_connect_object() except it traps the "destroy" signal to prevent you from having to clean up the handler.

class Signals
static
void
connectObjectWhileAlive

Parameters

object ObjectGtk

the object associated with the signal.

name string

name of the signal.

func GCallback

function pointer to attach to the signal.

aliveObject ObjectGtk

the user data, which must be an object, whose destruction should signal the removal of this signal.

Meta