After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 145110 - Documentation suggestion for Gtk2::TreeView - path strings
Documentation suggestion for Gtk2::TreeView - path strings
Status: RESOLVED FIXED
Product: gnome-perl
Classification: Bindings
Component: Gtk2
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: gtk2-perl-bugs
gtk2-perl-bugs
Depends on:
Blocks:
 
 
Reported: 2004-06-28 22:37 UTC by danflemming
Modified: 2005-02-10 21:04 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description danflemming 2004-06-28 22:37:12 UTC
Path strings (as used by Gtk2::TreePath) are not explained in the perl
documentation for gtk2. Here's my notes; the first paragraph is mostly
cribbed from the Ruby docs, IIRC. The second paragraph was written by me,
and is hopefully true. :)

Path strings are expected to be a colon separated list of numbers. For
example, the string "10:4:0" would create a path of depth 3 pointing to the
11th child of the root node, the 5th child of that 11th child, and the 1st
child of that 5th child. If an invalid path string is passed in, an error
results.

Usually, in a TreeView, you should be looking at depth 1 or 2 path strings.
If your TreeView consists of a single column, then the path string for the
cell in the first row is "0", the second row is "1", and so on. A
multi-column (but still an ordinary, two-dimensional) TreeView would have
"0:0" as the cell in the upper, left-hand corner, "0:1" for the cell to its
right, and "1:0" for the cell below it.
Comment 1 muppet 2004-06-29 18:25:47 UTC
Tree paths define only rows, and the number of elements in the path (depth)
determines how many parent nodes the row has.  For a ListView, the depth will
always be 1 because there are no children.
Comment 2 Torsten Schoenfeld 2005-02-10 21:04:47 UTC
Tree paths are now explained in the POD for Gtk2::TreeModel.  Closing.