@list.connect(SEL_COMMAND) do |sender, sel, pos|
  puts "Clicked on " + pos.to_s + " => " +
        @names[pos]
  puts "Currently selected:"
  @list.each do |item|
    if item.selected?
      puts "     " + item.text
    end
  end
end

