DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=E4OzVxbO5qdHonCYL6Gy3xkFPAB5WKk3p5vafDeT9jx/MwhqlugZordWZriuvjkhoo7dRiMOuys828NIr6qFHQRkc0jHt1DF1ZHhJXM+VjkbcPGdUWrD5TU1q/43s4+pH5x/EdvIpes2D6Ny5zscZMMyhJg0AW2U03lf5eTlCyI= Message-ID: Date: Fri, 30 Dec 2005 22:04:19 +0100 From: Maurizio Colucci To: lablgtk at math.nagoya-u.ac.jp Subject: Re: bug in GEdit.combo_box_text? In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Disposition: inline References: Content-Transfer-Encoding: 8bit 2005/12/30, Maurizio Colucci : > 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. Yes, this is a bug. I worked around it as follows: let surfCombo = GEdit.combo_box_text ~strings:["Cement"; "Clay"; "Grass"] ~packing:(mainGrid#attach ~left:1 ~top:0) () in let (co, _ ) = surfCombo in co#set_active 1; Installing 2.6.0 did not help. Cheers Maurizio