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

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2012年 8月 26日 (日) 09:02:15 JST


-------------------------
REMOTE_ADDR = 70.49.49.99
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-treev-addrnhs
-------------------------
@@ -555,7 +555,7 @@
 
 When "+Add" button is clicked ((*add_product(treeview, list)*)) method is called. In the first part of this method we build the a data entry dialogue, which allows a user to add new products under the existing product categories to the Grocery List. (Note that application as is would not allow to create a new product category.) As you probably know by now, we set up two product categories in our data array of records of type (class) "GroceyItem" called "list". We first build up the list of possible categories, which user will have to select in the Gtk::ComboBox in order to add a new item to the selected category. Then we build the data entry elements to provide the means to enter the products into the list. You shouldn't have too much trouble understanding this first part of this "add_product" method. But the second part (the dialog.run {...}) is where all the fun starts.
 
-We check if the user clicked Gtk::Stock::ADD button by testing for the Gtk::Dialog::RESPONSE_OK. First we have to make sure that all the data requirements are met. Most importantly that the items belong to an available product category. Only then we can proceed further. Otherwise we destroy the data entry dialogue and return to the main loop (Grocery List window with the tree view scrollbars and the two "+Add" and "-Remove" buttons).
+In the dialogue itself the button Gtk::Stock::ADD is associated with the Gtk::Dialog::RESPONSE_OK response signal, so we check if user has confirmed their entry with the "Add" button. Next, we have to make sure that all the data requirements are met. Most importantly that the items belong to an available product category. Only then we can proceed further. Otherwise we destroy the data entry dialogue and return to the main loop (Grocery List window with the tree view scrollbars and the two "+Add" and "-Remove" buttons).
 
 After we know we have legitimate data from the data entry dialogue, we need to prepare to traverse through our tree store searching for the matching product category. We start searching at the top of the tree store:
 




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