ruby-****@sourc*****
ruby-****@sourc*****
2012年 8月 20日 (月) 04:59:57 JST
------------------------- REMOTE_ADDR = 70.49.49.99 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-treev-trees ------------------------- @@ -140,17 +140,17 @@ # Add the category as a new root (parent) row (element). parent = store.append(nil) # store.set_value(parent, BUY_INDEX, list[i].buy # <= same as below - parent[BUY_INDEX] = list[i].buy - parent[QTY_INDEX] = list[i].quantity - parent[PROD_INDEX] = list[i].product - + parent[BUY_INDEX] = list[i].buy # same as: # store.set_value(parent, BUY_INDEX, list[i].buy) + parent[QTY_INDEX] = list[i].quantity # same as: # store.set_value(parent, QTY_INDEX, list[i].quantity) + parent[PROD_INDEX] = list[i].product # same as: # store.set_value(parent, Prod_index, list[i].product) + # Otherwise, add the product as a child row of the category. else child = store.append(parent) # store.set_value(child, BUY_INDEX, list[i].buy # <= same as below - child[BUY_INDEX] = list[i].buy - child[QTY_INDEX] = list[i].quantity - child[PROD_INDEX] = list[i].product + child[BUY_INDEX] = list[i].buy # same as: # store.set_value(child, BUY_INDEX, list[i].buy) + child[QTY_INDEX] = list[i].quantity # same as: # store.set_value(child, QTY_INDEX, list[i].quantity) + child[PROD_INDEX] = list[i].product # same as: # store.set_value(child, Prod_index, list[i].product) end end