Cannot modify selected_each model


#1

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


#2

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/