[Glade-users] help regarding the combobox append functionality at runtime

Tristan Van Berkom tristan.van.berkom@gmail.com
Thu, 07 Apr 2005 12:26:39 -0400


poonam chokshi wrote:
[...]
> int myfunc(char *name)
> {        int i=0;   
> 	GtkWidget *seccmbentry;
> 	GList *items,*seccmb_items;
[...]
> 	for(i=0;i<=section-1;i++)
> 	{
> 	      	seccmb_items=iniparser_getsecname(ini,i); //library function
> 		printf("Items=%s\n",seccmb_items);
> 		items=g_list_append(items,seccmb_items); // giving me error over here

     You are feeding a wild pointer to g_list_append(), if you pass NULL
(i.e. initialize `items' to NULL) then g_list_append() will create a
new list head.

Note that gtk-app-devel-list or gtk-list are probably better
suited for this kind of question.

Cheers,
                               -Tristan