ruby-****@sourc*****
ruby-****@sourc*****
2012年 8月 12日 (日) 06:35:29 JST
------------------------- REMOTE_ADDR = 184.145.90.35 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-treeview-model-reference ------------------------- @@ -31,7 +31,7 @@ Tree row references reveal the current path of a row with Gtk::TreeRowReference#path. There is no direct way to get a tree iter from a tree row reference, you have to retrieve the tree row reference's path first and then convert that into a tree iter. For example following is a simulation showing how to obtain an iter from a tree reference: - row_ref = Gtk::TreeRowReference.new(treestore, Gtk::TreePath.new("2:0:1")) + row_ref = Gtk::TreeRowReference.new(treestore, Gtk::TreePath.new("2:0:1")) # <--- pretend we have an arbitrary TreeReference iter = row_ref.model.get_iter(row_ref.path) puts "Iter from Ref: First Name: #{iter[0]}"