GNode question
- From: vladimir <vladeck sezampro yu>
- To: gtk-app-devel-list <gtk-app-devel-list gnome org>
- Subject: GNode question
- Date: 18 Oct 2002 21:58:42 +0200
Good day,
Developers!
This is my question:
I have a GNode tree set up like this:
+----------------+
| main_node NULL |
+---------+-------+--------+--------+
| | |
+-----+-----+ +-----+-----+ +-----+-----+
| node1 NULL| | node2 NULL| | node3 NULL|
+-----------+ +-----------+ +-----------+
They are all set up with >> g_node_new (NULL) << so, they do not
contain any data. Now, can i just assign some data to child node?
Something like (for node2):
node = g_node_nth_child (main_node, 1);
node->data = g_strdup ("Some char* data"); ?
Of course, I will free nodes when not needed anymore. Is this OK, or
should I do it another way?
THANKS,
Vladimir Djokic.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]