GList weirdness
- From: "HaB JacKaL" <feelthel0ve hotmail com>
- To: gtk-list gnome org
- Subject: GList weirdness
- Date: Thu, 20 Sep 2001 16:34:59 -0400
Hello...
I'm building a combo box using items found in a database..
Having a weird problem with the behavior of a GList.  Here is the code 
excerpt:
GList *countries = NULL;
.
.
.
while((row = mysql_fetch_row(result)))
	{
	  printf("fetching %s\n", row[0]);
	  countries = g_list_append(countries, (gpointer)row[0]);
	  printf("countries = %s\n", countries->data);
	}
     printf("outside while countries = %s\n", countries->data);
     combo = gtk_combo_new();
     gtk_combo_set_popdown_strings(GTK_COMBO(combo), countries);
.
.
.
The out put is as follows:
fetching United States
countries = United States
fetching Canada
countries = Canada
outside while countries =
I have NO CLUE why the values are disappearing outside of that while loop.  
The declaration for countries is inside the same func.  Anyone know?
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]