[ruby-gnome2-doc-cvs] [Ruby-GNOME2 Project Website] update - tut-gtk2-treev-trees

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2009年 2月 17日 (火) 02:38:48 JST


-------------------------
REMOTE_ADDR = 74.15.84.244
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-treev-trees
-------------------------
@@ -169,7 +169,7 @@
  list[7] = GroceryItem.new($p_child,    false, 3, "Chips")
  list[8] = GroceryItem.new($p_child,    true,  4, "Soda")
 
-Beside our initial setup of our array called ((*list*)) you will find numerous hints that this indeed is the case. Parent/child relationship dictates that we bundle together all children of a parent below it. When later on application inserts new rows particularly children they have to be inserted into or better immediately after the list child of such a group. This makes indices to certain rows ephemeral. For instance if you store (memorize) an index to a certain row that index will became invalid after an insertion or a deletion of a row positioned before the element (row) for which you have stored (memorized) the index. Also the orderly sequential organization of the rows in a tree store allows you to readily process the data, since you can always be sure about locations of rows and the groupings of the children can be determined in a predictable manner. In our example program we exploited this fact in the loop calculating the totals for the parents by iterating through their groups of children: 
+Beside our initial setup of our array called ((*list*)) you will find numerous hints that this indeed is the case. Parent/child relationship dictates that we bundle together all children of a parent below it. When later on application inserts new rows, particularly children, they have to be inserted into or better immediately after the list child of such a group. This makes indices to certain rows ephemeral. For instance if you store (memorize) an index to a certain row that index will became invalid after an insertion or a deletion of a row positioned before the element (row) for which you have stored (memorized) the index. Also the orderly sequential organization of the rows in a tree store allows you to readily process the data, since you can always be sure about locations of rows and the groupings of the children can be determined in a predictable manner. In our example program we exploited this fact in the loop calculating the totals for the parents by iterating through their groups of children: 
 
 
  list.each_with_index do |e, i|




ruby-gnome2-cvs メーリングリストの案内
Back to archive index