Forum: Ruby Visualruby - Listview Problem with selected_row

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Cbcd6800cbdb2bc8edb33120fb6d0408?d=identicon&s=25 Ulrich Hermann (bluewhite11)
on 2017-02-25 18:02
Hi,
I defined a ListView like your tutorial examples. THis works fine.


   @filterPMlist=VR::ListView.new(cols)

I also tried to code :

  def filterPMlist__row_activated(*args)
   row= @filterPMlist.selected_row
   #puts row[:myfield]  # =>  "Hello World"
  end

the funtion is called, but I get the error:

var/lib/gems/2.3.0/gems/visualruby-3.1.3/lib/treeview/ViewCommon.rb:132:in
`method_missing': undefined method `selected_row' for
#<VR::ListView:0x3537110 ptr=0x44d83b0>

What is my mistake?

Regards
Ulli
4828d528e2e46f7c8160c336eb332836?d=identicon&s=25 Robert Heiler (shevegen)
on 2017-02-25 23:47
Isn't that ruby-gtk specific? You may have more luck posting in the
ruby-gtk subsection. I know that the maintainer of visualruby sometimes
posts on the ruby-gtk / ruby-gnome subsection of the forum.
This topic is locked and can not be replied to.