ruby-****@sourc*****
ruby-****@sourc*****
2012年 9月 28日 (金) 02:08:55 JST
------------------------- REMOTE_ADDR = 184.145.80.187 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-treev-rr ------------------------- @@ -18,7 +18,7 @@ :Imaginary, invisible root node: - Pay attention to((*imaginary, invisible*))here. If you do not, you will finally notice this point when inserting rows into a tree view by double clicking the row, under which, you'd like to insert a "sub-item". Namely, there is no row for the((*imaginary, invisible row.*))That is why it is called invisible. True, there is no physical row there, but the top level on which the top root node exists is anything but imaginary! We, will discus this problem in the second version of the 'treev-MultiDim-load-asci-table.rb' example (- remember we announced issues for programming the insertion of new rows). + Pay attention to((*imaginary, invisible*))here. If you do not, you will finally notice this point when inserting rows into a tree view by double clicking the row, under which, you'd like to insert a "sub-item". Namely, there is no row for the((*imaginary, invisible row.*))That is why it is called invisible. True, there is no physical row there, but the top level on which the top root node exists is anything but imaginary! We, will discus this problem in the second version of the 'treev-MultiDim-load-asci-table.rb' example (- remember we announced issues for programming the insertion of new and deletion of existing rows). At this point in addition to Gtk::TreeStore, we also need to address the Gtk::ListStore. As lists are just trees without child nodes, all rows in a list always have tree paths of depth 1. Gtk::TreePath#indices returns the internal integer array of a tree path. You will rarely operate with paths, but if you do, you most likely will use methods like Gtk::TreePath#up!, Gtk::TreePath#down!, Gtk::TreePath#next!, Gtk::TreePath#prev!, Gtk::TreePath#ancestor?, Gtk::TreePath#decendent?. Note that this way you can operate on tree paths which refer to rows that do not exist in model. A far more coomon way to refer to a row in a list or tree model is Gtk::TreeIter.