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

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2012年 9月 21日 (金) 10:56:41 JST


-------------------------
REMOTE_ADDR = 184.145.80.187
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-treev-trees
-------------------------
@@ -114,7 +114,7 @@
  window.show_all
  Gtk.main
 
-The only difference between the original listing of "liststore.rb" and the modified version "treestore.rb" of our  Gtk::TreeView  example programs where the first employs the Gtk::ListStore and the second the Gtk::TreeStore is in the creation but not in the structure of the models i.e.((*stores,*))hence the tree model here keeps the same structure as the list model in original program, with three columns defined as Boolean, integer and a string. What changed is the initialization process as well as the structure of GroceryItem class, which now includes a controlling field (attribute) called @product_type, to store a flag determining the parent/child relationship, and which subsequently is used in the model (store) initialization loop to drive either parent or child nodes creation and initialization. Additionally the total numbers of items to be bought in either category is calculated in separate sub-loop for each category. Note, that this processing arrangement requires that
  all categories are bundled together in the initialization array of GroceryItem objects.
+The only difference between the original listing of "liststore.rb" and the modified version "treestore.rb" of our  Gtk::TreeView  example programs where the first employs the Gtk::ListStore and the second the Gtk::TreeStore is in the creation but not in the structure of the models i.e.((*stores,*))hence the tree model here keeps the same structure as the list model in original program, with three columns defined as Boolean, Integer and String. What changed is the initialization process as well as the structure of GroceryItem class, which now includes a controlling field (attribute) called @product_type, to store a flag determining the parent/child relationship, and which subsequently is used in the model (store) initialization loop to drive either parent or child nodes creation and initialization. Additionally the total numbers of items to be bought in either category is calculated in separate sub-loop for each category. Note, that this processing arrangement requires that a
 ll categories are bundled together in the initialization array of GroceryItem objects.
 
 
 Adding columns and renderers renderers is performed in the same manner with both list and tree models, because columns are part of the view not the model:




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