Re: [gnome-db] gnome-combo - how to get the selection



On Thu, 2004-03-18 at 15:08 -0600, DANIEL ESPINOSA wrote:

> If select a item in the list, how do I get the text in
> the entry, to use it in other query.
> 
> if I have
> 
> GnomeDbCombo *proyecto;
> 
> and use:
> 
> proyecto->combo->entry
> 
this is wrong, it should be:

GTK_COMBO (proyecto)->entry

> Is it correct, becouse gcc send me and error? and of
> course I try to use
> 
> gtk_entry_get_text() to get the text, but the last
> line of code don't work.
> 
> Pleas Help Me!
> 
> I'm using the next code but it send a error:
> 
> GdaDataModel *data_model;
> 
> GString *sql = g_string_new(NULL);
> 
> g_string_assign(sql, _("SELECT nombre FROM obras WHERE
> proy="));
> g_string_append(sql,"'");
> //Is the next correct?
> 
> g_string_append(sql,gtk_entry_get_text((proyecto->combo->entry)));
> 
again, use GTK_COMBO (proyecto)->entry

we should probably add a gnome_db_combo_get_selection function though,
to make all this easier.

cheers




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]