Re: gtk_combo
- From: Taura Milana <learfox furry ao net>
- To: GTK App Devel <gtk-app-devel-list gnome org>
- Subject: Re: gtk_combo
- Date: Sat, 8 Dec 2001 13:48:01 -0800
On 2001.12.08 05:49 Rafeeq C E wrote:
**********************************************************
while ((row = mysql_fetch_row(result))){
items = g_list_append (items, row[0]);
}
combo1 = gtk_combo_new();
gtk_combo_set_popdown_strings (GTK_COMBO
(combo1), items);
gtk_widget_show(combo1);
I don't know what mysql is or what it returns, but assuming
it returns a char *, then you should do it like this:
const gchar *cstrptr;
items = NULL;
cstrptr = mysql_fetch_row(result);
while(cstrptr != NULL)
{
items = g_list_append items, cstrptr);
cstrptr = mysql_fetch_row(result);
}
Assuming that result is an incremented handle that mysqpl_fetch_row()
increments on each call.
Also when you give code, besure to give prototypes, espessially
about alien languages like mysql. Since this is a gtk list,
most coders may not know what mysql is.
--
Sincerely, ,"-_ \|/
-Capt. Taura M. , O=__ --X--
..__ ,_JNMNNEO=_ /|\
OMNOUMmnne. {OMMNNNEEEEOO=_
UOOOBIOOOEOMMn. 'LONMMMMNNEEEOOO=.__..,,..
UUOOEUUOOOOOOOObe '"=OMMMMWNEEEOOOOO,"=OEEEOO=,._
OOUUUIEEIOONNOIUbe. "7OMMMMNNNNNWWEEEEOOOOOO" "'.
EEBNNMMMNWNWWEEIMMNe. __ 7EMMMNNNNNWWWEEEEEEEOO. " .
NNMMMMWWWMMMWEINMMMNn "=BBEEEEMMMMMMMMNNNWWWEEOOOOO=._ .
http://furry.ao.net/~learfox/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]