Forum: Ruby-Gnome 2 Cannot modify selected_each model

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.
mack stout (Guest)
on 2007-07-13 18:33
(Received via mailing list)
Hi List,

I'm having some trouble w/ this piece of code:

@stores_selected.selected_each do |model, path, iter|
     subrow = model.append(iter)
end

it appears as though modifying the model from within a selected_each
iteration is not allowed as I get this error:

Gtk-WARNING **:The model has been modified from within
gtk_tree_selection_selected_foreach.
This function is for observing the selections of the tree only.  If you
are
trying to get all selected items from the tree, try using
gtk_tree_selection_get_selected_rows instead.

I don't see a method for get_selected_rows in the api, is there
something
I'm doing wrong?

Max
Masao M. (Guest)
on 2007-07-13 19:46
(Received via mailing list)
Hi,

On Fri, 13 Jul 2007 09:33:09 -0500
"mack stout" <removed_email_address@domain.invalid> wrote:

>
> Gtk-WARNING **:The model has been modified from within
> gtk_tree_selection_selected_foreach.
> This function is for observing the selections of the tree only.  If you are
> trying to get all selected items from the tree, try using
> gtk_tree_selection_get_selected_rows instead.
>
> I don't see a method for get_selected_rows in the api, is there something
> I'm doing wrong?

Gtk::TreeSelection#selected_rows

--
.:% Masao M.<removed_email_address@domain.invalid>


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
This topic is locked and can not be replied to.