Unsetting the active item in a ComboBox

I want to unset the active item in a combobox, but setting active_iter
to nil is giving me an assertion failure. See the attached file for some
example code. When I run this script, I get the following:

(eval): line 1
Gtk-CRITICAL **:gtk_tree_model_get_path: assertion `iter != NULL’

The Ruby-Gnome doesn’t say how to unset the active item. The GTK
documentation for gtk_combo_box_set_active_iter says:

… or unsets the active item if iter is NULL.

So I assumed that setting active_iter to nil would work in Ruby, but it
seems not.

Can anyone tell me how to unset the active item for a ComboBox?


It works for me in the version that’s with Ubuntu (0.19.3 I think).
You might also want to try active = -1 But it looks like a bug
in whatever version you have installed.


On 8 June 2010 15:14, Bernie Schelberg