Package: gobject

Function gobject:object-set-data-full

Lambda List

gobject:object-set-data-full (object key func)

Arguments

object -- a g:object instance containing the associations
key -- a string with the name of the key
func -- a g:destroy-notify callback function

Details

Like the g:object-data function except it adds notification for when the association is destroyed, either by setting it to a different value or when the object is destroyed. Note that the func callback function is not called if the data argument is nil.

Examples

Set a destroy notify callback function for a window. This function is called when the window is destroyed or when the data is set to nil.
(g:object-set-data-full window "about"
                        (lambda ()
                          (gtk:window-destroy about)))    
 

See also

2024-12-14