Hi,

On Mon, 24 Feb 2003 10:51:51 +0900
Daniel Carrera <dcarrera / math.umd.edu> wrote:

> On Mon, Feb 24, 2003 at 10:37:43AM +0900, mutoh / highway.ne.jp wrote:
> 
> > >>       tree_view.signal_connect('cursor-changed') do |e|
> > >>         iter = tree_view.selection.selected
> > >>       end
> > >
> > >I've been trying to Gtk::TreeSelection this all weekend.  I doesn't >work.  
> > >Try it!
> > 
> > Could you send your test code here?
> > How doesn't it work?
> 
> It doesn't work in the sense that the 'iter' returned does not correspond 
> to any of the entries in the list structure.  Sample code is attached.

Thanks. I understood your issue.
I'll fix it.

BTW, your original questions is :
> > Suppose that I make a tree with the entries "Jeffrey", "Melissa" and 
> > "Sandy".  I want to know whether the user clicked on "Jeffrey" or whether 
> > he clicked on "Melissa" or "Sandy".

If you want to solve this problem now,
please try below codes:

------
tree_view.signal_connect('cursor-changed') do
    iter = tree_view.selection.selected
    if    iter.get_value(0) == jeffrey.get_value(0)
        puts "Jeffrey"
    elsif iter.get_value(0) == melissa.get_value(0)
        puts "Melissa"
    elsif iter.get_value(0) == sandy.get_value(0)
        puts "Sandy"
    else
        puts "No one"
    end
end


-- 
.:% Masao Mutoh<mutoh / highway.ne.jp>