TreeNode.setNodeAttribute

Set the value associated to a named attribute. The attribute string is used AS IT IS by this method (eg. no copy of it is made), and the memory it uses will be freed using the destroy function when no longer needed (if destroy is null, then the string will not be freed at all).

Attributes can have any name, but Libgda proposes some default names, see <link linkend="libgda-40-Attributes-manager.synopsis">this section</link>.

For example one would use it as:

<code> gda_tree_node_set_node_attribute (node, g_strdup (my_attribute), my_value, g_free); gda_tree_node_set_node_attribute (node, GDA_ATTRIBUTE_NAME, my_value, NULL); </code>

If there is already an attribute named attribute set, then its value is replaced with the new value (value is copied), except if value is null, in which case the attribute is removed.

class TreeNode
void
setNodeAttribute

Parameters

attribute string

attribute name

value gobject.value.Value

a #GValue, or null

destroy glib.types.DestroyNotify

a function to be called when attribute is not needed anymore, or null