Message-ID: <43B5A2D5.4070505 at rftp.com> Date: Fri, 30 Dec 2005 13:12:53 -0800 From: Robert Roessler Organization: Robert's High-performance Software MIME-Version: 1.0 To: LablGTK List Subject: Re: bug in GEdit.combo_box_text? References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Maurizio Colucci wrote: > I can't seem to set the default entry in a combo box: the following code > > let surfOptMenu = GEdit.combo_box_text ~strings:["Cement"; "Clay"; "Grass"] > ~packing:(mainGrid#attach ~left:1 ~top:0) ~active:0 () in > > > gives the following output: > > (freetennis:15185): Gtk-CRITICAL **: gtk_tree_row_reference_new: > assertion `GTK_IS_TREE_MODEL (model)' failed > > (freetennis:15185): Gtk-CRITICAL **: gtk_cell_view_set_displayed_row: > assertion `GTK_IS_TREE_MODEL (cell_view->priv->model)' > > > and the combo box appears empty. > > Any ideas for a workaround? I am using lablgtk2 as in Ubuntu Breezy > (version 2.4.0+2005.06.13-1build1). If the "2.4.0+..." above corresponds to the LablGTK release, then it is not current - a newer release has been out for two months. You could just grab the current source tree at http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/lablgtk.html and build it locally... builds are pretty smooth, even for Windows! :) Also, do not overlook the "examples" directory tree - the file combobox.ml shows uses of combo_box_text. Note that the default item is being set explicitly just after creation, plus the tuple nature of the constructed value. Robert Roessler robertr@rftp.com http://www.rftp.com